Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Updating Combo box list content 1

Status
Not open for further replies.

KevinNewtoAccess

Technical User
Dec 7, 2000
13
GB
I am developing an application which uses a combo box to enter data into a field on a form in datasheet mode.
The combo box is based on a query which pulls a list of part numbers previously used by a supplier. This works fine for the first record entered but the query does not appear to be re-run for each new record entered. ( it needs to re-run as selection depends on supplier)
How do I get the combo box to requery the data for each new record added?
 
In the AfterUpdate event of the form or desired object place the following code:

ComboBox.Requery

(where ComboBox is the name of the object)
Since you are using datasheet mode, you can use the form because the form will always refer to the current record.

Rob Marriott
rob@career-connections.net
 
Thanks. Just the clue I needed although I had to put the code into the After Update section of the field which sets the parameter for the query filter.

Anyhow - problem solved !

Huge Thanks !!!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top