Solved

MS Access Filter Form Combo Box Too Slow to Populate

Posted on 2013-01-31
4
1,836 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
4 Comments
 
LVL 75

Accepted Solution

by:
DatabaseMX (Joe Anderson - Microsoft MVP, Access and Data Platform) 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

Business Impact of IT Communications

What are the business impacts of how well businesses communicate during an IT incident? Targeting, speed, and transparency all matter. Find out more in this infographic.

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. …
This article describes two methods for creating a combo box that can be used to add new items to the row source -- one for simple lookup tables, and one for a more complex row source where the new item needs data for several fields.
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
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 …

738 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