Combined comboboxes makes the form really slow to open

dealwi8me

Registered User.
Local time
Today, 11:22
Joined
Jan 5, 2005
Messages
187
Hello,

I have a form with 5 comboboxes each one combines to the previous combobox. After I update combo1 i use requery function for combo2,combo3,combo4,combo5. After I update combo2 i use requery function for combo3,combo4,combo5 and so on.
The problem is that the form is getting really slow to open the first time. Is there a better way to deal with combined comboboxes than using requery function?

Thank you in advance:)
 
if the records sets for each combo box is very large then a common technique is to remove the recordsource from each combo box and set it in the preceeding combo box's after update event. ie replace the requery
 
The recordsets are not large at all (5-6 choices each one). I think the problem is because i run requery function for all remaining comboboxes after update event on each combobox.
 
" I think the problem is because i run requery function for all remaining comboboxes"

Why are you doing that? It sounds like these are cascading comboboxes, with each one dependant on the previous one; will the user always be accessing them in order, i.e. 1-2-3-4-5, or can they skip from cbo1 say to cbo4? If they'll always go in order, there's no reason to requery all the remaining comboboxes, just the next in line. You're probably correct in guessing that the comboboxes are slowing your opening, and Dennisk's advice on handling this is spot on.
 
I'm doing this because I notice that if I don't use the requery function and user change the value of combo1, when i click on combo2 I get the choices that I was getting before I change the combo1.

remove the recordsource from each combo box and set it in the preceeding combo box's after update event
I'm sorry I didn't understand what exactly i must do... can you explain to me how to do that?

Thank you both for your answers :)
 
I use this technique a lot and I've never noticed any loss of performance.
But then again it may depend on the complexity of the underlying queries for each combo box.

to answer your question each comboBox has a rowsource property

ie myComboBox.RowSource = "YourQuery"

so remove all the rowsSources from the combo boxs and where you requery

replace with the above code substiting your combo box name and rowsource.
 
I'm sorry for the latish answer but i had a problem with my pc.

Dennisk i tried your solution and it seems to works! Thanks again for everything :)
 

Users who are viewing this thread

Back
Top Bottom