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 derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Combo Box refresh

Status
Not open for further replies.

nberryman

Instructor
Joined
Jun 1, 2002
Messages
556
Location
GB
I am having problems getting a combo box to refresh when I change records.

The combo box gets the data from a table via criteria in a field on the form. It pick up the criteria data when I open the form but when I change records it maintaing list for the first question.

Where am I going wrong!!!!!!!!!!!!!!!!!!



Neil Berryman
IT Trainer
neil_berryman@btopenworld.com
 
Are you saying your combo's RowSource is something like:-

"SELECT flied1, field2 FORM tblName WHERE field3 = '" & controlOnForm & "'"


Then the problem could stem from having the combo box itself higher up the tab order than the controlONForm that provides the criteria for the RowSource.

Solution.
In the Form's On_Current event put
ComboControlName.Requery

( Or change the tab order sequence. )


'ope-that-'elps.

G LS
 
Thanks, all is now well the

On_Current event


ComboControlName.Requery

worked a treat

Thanks
Neil Berryman
IT Trainer
neil_berryman@btopenworld.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top