By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,656 Members | 1,944 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,656 IT Pros & Developers. It's quick & easy.

list boxes don't update with the right row source (from query) when navig. in form

P: 9

I have a list box that updates it's row source with a query that is dependent on two other form controls.

But it doesn't change when I move from a record to another within the form, unless I change the controls that are criteria for the query, after i have moved from one record to another. I've put the Me.refresh command in the On Change event of the controls, as a kind person pointed out in my previous question

Now I tried using Me.refresh with events such as On Enter (of the subform), On Load (of the form) but to no avail.

thanks for your help!!
Jan 24 '08 #1
Share this Question
Share on Google+
3 Replies

Expert 2.5K+
P: 3,532
Are the controls that are used by the query bound controls? If on Record A you pick/enter English and Spanish, go to Record B and pick/enter Russian and French, then return to Record A, do the controls still hold English and Spanish?

If the controls are bound and retain their original value for the given record, in the Form_Current event requery the listbox, with something like

Expand|Select|Wrap|Line Numbers
  1. Private Sub Form_Current()
  2.   MyListBox.Requery
  3. End Sub
substituting the actual name of your listbox for MyListBox.

Welcome to TheScripts!

Linq ;0)>
Jan 24 '08 #2

P: 9
thanks so much that worked like a charm!

also thanks for the welcome :)
Jan 24 '08 #3

Expert 2.5K+
P: 3,532
Glad we could help!

Linq ;0)>
Jan 24 '08 #4

Post your reply

Sign in to post your reply or Sign up for a free account.