?
Solved

MS Access Filter Form Combo Box Too Slow to Populate

Posted on 2013-01-31
4
Medium Priority
?
1,919 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 2000 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

Get MongoDB database support online, now!

At Percona’s web store you can order your MongoDB database support needs in minutes. No hassles, no fuss, just pick and click. Pay online with a credit card. Handle your MongoDB database support now!

Question has a verified solution.

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

Access custom database properties are useful for storing miscellaneous bits of information in a format that persists through database closing and reopening.  This article shows how to create and use them.
It is possible to export the data of a SQL Table in SSMS and generate INSERT statements. It's neatly tucked away in the generate scripts option of a database.
With Microsoft Access, learn how to start a database in different ways and produce different start-up actions allowing you to use a single database to perform multiple tasks. Specify a start-up form through options: Specify an Autoexec macro: Us…
Have you created a query with information for a calendar? ... and then, abra-cadabra, the calendar is done?! I am going to show you how to make that happen. Visualize your data!  ... really see it To use the code to create a calendar from a q…
Suggested Courses

752 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