Solved

MS Access Filter Form Combo Box Too Slow to Populate

Posted on 2013-01-31
4
1,872 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

PeopleSoft Has Never Been Easier

PeopleSoft Adoption Made Smooth & Simple!

On-The-Job Training Is made Intuitive & Easy With WalkMe's On-Screen Guidance Tool.  Claim Your Free WalkMe Account Now

Question has a verified solution.

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

In Part II of this series, I will discuss how to identify all open instances of Excel and enumerate the workbooks, spreadsheets, and named ranges within each of those instances.
If you need a simple but flexible process for maintaining an audit trail of who created, edited, or deleted data from a table, or multiple tables, and you can do all of your work from within a form, this simple Audit Log will work for you.
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 …
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

717 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