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 IamaSherpa 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 lists

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?
 
I have a similar problem with a list box. The list is based on a query and I need the list contained to change dependent on a second field. Started to write code to do it but ended up getting more and more confused. All help appreciated!!!
 
You guys should search the vairous Access forums for the key word "Requery." it's a common newbie question... yes i had the same question too ;-)


Kevin,

yes, you'll need to requery your comboBox after you update the part number... this is straight forward to do. with a
Me.MyComboBox.Requery command. the only issue is choosing the best time to requery. That's going to depend on when & where those partNo/Supplier relationships are estabished. if their on the the same form or even on a subform then you're golden & see my note to Craig. if not then let me know & we'll go on from there

Craig,

you're in great shape, in the SecondFieldControl_AfterUpdate event you can add the Me.MyComboBox.Requery command

rafe
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top