• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1998
  • Last Modified:

MS Access Filter Form Combo Box Too Slow to Populate

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
IEHP1
Asked:
IEHP1
  • 2
  • 2
1 Solution
 
DatabaseMX (Joe Anderson - Microsoft MVP, Access and Data Platform)Commented:
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
 
IEHP1Author Commented:
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
 
IEHP1Author Commented:
Simplest and most effective solution
0
 
DatabaseMX (Joe Anderson - Microsoft MVP, Access and Data Platform)Commented:
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

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now