Solved

MS Access Filter Form Combo Box Too Slow to Populate

Posted on 2013-01-31
4
1,738 Views
Last Modified: 2013-01-31
Hello,

So I have 6 combo boxes in a form used to filter results into a subform. I have noticed that after the form first opens and I click one of the combo boxes, there is a noticeable delay before it actually populates all of the records.

I have read about using the OnChange event to filter out records based on typing in 3 or more characters (or whatever number of characters you want to set it too). But as nice as that is, this form would be used in a way by the users that they will actually click the drop-down arrow to see all the records and find one.

Is there a way to load up\prepopulate the combo boxes when the form first gets opened?
0
Comment
Question by:IEHP1
  • 2
  • 2
4 Comments
 
LVL 75

Accepted Solution

by:
DatabaseMX (Joe Anderson - Access MVP) earned 500 total points
ID: 38841681
Try this trick in the Load event of your form:

Dim x As Long
x = Me.YourComboBoxName.ListCount

----

now see if you notice a difference ...

mx
0
 

Author Comment

by:IEHP1
ID: 38841751
Right ON DatabaseMX!!!!

That I think is the simplest solution I have seen without having to write lines and lines of code that would just do the same thing.........

The form now takes about 20 seconds to load up (not fast by any stretch of the imagination....lol)

But if I don't use all of the 6 ComboBoxes in that Dim Statement, I can balance out the OnLoad time of the form itself (when it first opens) and which ComboBoxes the users will most often use to filter records.

I am trying to learn a little VBA here, can you kind of explain what the Dim statement is doing please?
0
 

Author Closing Comment

by:IEHP1
ID: 38841755
Simplest and most effective solution
0
 
LVL 75
ID: 38841821
That line of code forces Access to fully populate the combo box.  Doesn't seem to work quite as well for a List box ...

mx
0

Featured Post

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

I'm trying, I really am. But I've seen so many wrong approaches involving date(time) boundaries I despair about my inability to explain it. I've seen quite a few recently that define a non-leap year as 364 days, or 366 days and the list goes on. …
A simple tool to export all objects of two Access files as text and compare it with Meld, a free diff tool.
In Microsoft Access, learn how to use Dlookup and other domain aggregate functions and one method of specifying a string value within a string. Specify the first argument, which is the expression to be returned: Specify the second argument, which …
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

770 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question