multiselect listboxes, requery others after update

lala

Registered User.
Local time
Today, 15:29
Joined
Mar 20, 2002
Messages
741
Hi, i have a form with 10 multiselect extended listboxes where a user can choose his criteria for the form. the idea is that after making selections in one listbox - the others requery and show choices based on what's been selected


for example, i have 3 listboxes, city, state and zip. if user selects ny, then the cities and zips will only be new york's

the problem is that i'm probably using wrong events and the listboxes don't requery after selections. my question is, what's the even that fires after ALL selections have been made (how does the program know if i'm done selecting? i could've selected one value, then pressed Ctrl and selected a few more)

thank you
 
Ultimately unless you tell Access, it has no idea that you have made all the selections you wish in a multi-select list box. You could signal to Access that you have completed your selection process by using a command button to fire your code.

Perhaps one of these links will give you some ideas.
 
I think the OP was thinking of firing the event everytime a list is selected. To be honest, lala, this isn't a good idea. JBB has suggested using a button and I agree with him.
 
I think the OP was thinking of firing the event everytime a list is selected. To be honest, lala, this isn't a good idea. JBB has suggested using a button and I agree with him.

using a button for each listbox? too complicated and not easy to use. if you have one listbox then selecting and clicking a button might be ok, but doing it after each?

damn, so no way?
 
We didn't say there isn't a way, we were just saying it's more logical to have them click a button to confirm their selections.

You can try to use the Key Up event of the listbox and check the Shift parameter:
Code:
If Shift = 2 Then
      ' Execute code here
End If
 
Thank you very much
But you have to agree that from the standpoint of having to click as little as possible its better not to have buttons
I always design my dbs using that as a model, user having to click as little as possible, my personal preference
 
Not necessarily the case. If it would cause your db to get requeried unecessarily then it's not worth it. Another factor could be whether those listboxes are constantly being used, how busy the form is (in terms of layout). So maybe from your standpoint (based on certain factors) this was the right thing for you to do.
 

Users who are viewing this thread

Back
Top Bottom