Update data with a Combo box

T

Terry

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
 
S

Sprinks

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top