H
h2fcell
First some back ground about what I’m doing:
Using Access 2002, I have a form1 that looks at records in one table.
Form1 has a dropdown combo box that “Finds a record on my form based on the
value I selected in my combo box†.
The text boxes on form1 are all “Locked†= Yes, so the record can’t be
changed.
The dropdown combo box is not locked, so it allows me to select from the list.
I have an “Add New Record†button which opens form2 with all the fields of
form1 including the field used as the “Row Source†in form1 dropdown combo
box.
After adding a record on form2 and closing the form, the dropdown combo box
in form1 does not see the new record until I close and reopen form1.
My Solution:
I attached a macro that closes form1 and opens form2 to the “On Click†event
of the “Add New Record†button on form1. I run a macro attached to “On
Close†event of form2 that opens form1.
This action refreshes the dropdown combo box on form1.
I feel my solution is primitive.
Is there a way to refresh the data in dropdown combo box of an open form
without closing and reopening the form? Perhaps “Event Procedure†code added
to the “On Close†event of form2.
Using Access 2002, I have a form1 that looks at records in one table.
Form1 has a dropdown combo box that “Finds a record on my form based on the
value I selected in my combo box†.
The text boxes on form1 are all “Locked†= Yes, so the record can’t be
changed.
The dropdown combo box is not locked, so it allows me to select from the list.
I have an “Add New Record†button which opens form2 with all the fields of
form1 including the field used as the “Row Source†in form1 dropdown combo
box.
After adding a record on form2 and closing the form, the dropdown combo box
in form1 does not see the new record until I close and reopen form1.
My Solution:
I attached a macro that closes form1 and opens form2 to the “On Click†event
of the “Add New Record†button on form1. I run a macro attached to “On
Close†event of form2 that opens form1.
This action refreshes the dropdown combo box on form1.
I feel my solution is primitive.
Is there a way to refresh the data in dropdown combo box of an open form
without closing and reopening the form? Perhaps “Event Procedure†code added
to the “On Close†event of form2.