Update data with a Combo box

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I would like to use a combo box to display a record from a table [Ret] to a
form [RetForm] for updating. My form [RetForm] has a combobox on it [Combo47]
which displays the [ReqID] but when I enter a [ReqID] the form won't change
from the first record in the table to the [ReqID] I type in. Can anyone
explain the correct procedure on how to set the combobox properties to
achieve this?
Thank You Terry
 
Hi, Terry.

If you're trying to use a combo box as a record selector for the recordset
underlying the form, be sure the box is unbound; i.e., does not have anything
in the Control Source. If you did, you would be changing the data in the
current record.

All you need to do is call the OpenForm method in the combo box' AfterUpdate
event, using the selection in the combo box as the Where criteria:

DoCmd.OpenForm "YourForm", , ,"ReqID = " & Me!YourComboBox

Hope that helps.
Sprinks
 
Back
Top