L
Larry
I have a combobox which contains several different column names from a
table. When the user selects this column, I change the RowSource of
another combobox to select all the distinct values of that column from
the table. So that when the user clicks the dropdown, all the
appropriate values will be available.
The problem is, when they click the dropdown button on the value
combobox, there is a lag of 1 to 2 seconds, before the values are
displayed. This is causing the users to keep clicking the dropdown
arrow, thinking they did not click it the first time, so of course,
when it does dropdown, the second/third clicks will close it and open
it again or something. So it looks like it can't make up it's mind!
Anyway, further clicks on the dropdown button get instant action. But
if they then change the Column combobox to select another column, and
click the value dropdown again, it is slow again.
In the AfterUpdate of the Column combobox, I ReQuery the Value
combobox, thinking that it would load the data at that time. But it
appears that it doesn't actually load the data until the user clicks
the dropdown themselves. The following is the code I have in the
AfterUpdate event of the column combobox.
Me.cboValue.RowSourceType = "Table/Query"
strSQL = "SELECT DISTINCT " & strColumn & " " & _
"FROM " & QUERY_NAME & " " & _
"ORDER BY " & strColumn & ";"
Me.cboValue.RowSource = strSQL
Me.cboValue.Requery
I have thought about getting the Value dropdown to go ahead and
dropdown at the time it's ReQueried, but I think that would look ugly,
so haven't tried it yet. But I probably will, just to see if it helps.
Any ideas as to why this lag is there and what I can do to stop it?
Thanks,
Larry
table. When the user selects this column, I change the RowSource of
another combobox to select all the distinct values of that column from
the table. So that when the user clicks the dropdown, all the
appropriate values will be available.
The problem is, when they click the dropdown button on the value
combobox, there is a lag of 1 to 2 seconds, before the values are
displayed. This is causing the users to keep clicking the dropdown
arrow, thinking they did not click it the first time, so of course,
when it does dropdown, the second/third clicks will close it and open
it again or something. So it looks like it can't make up it's mind!
Anyway, further clicks on the dropdown button get instant action. But
if they then change the Column combobox to select another column, and
click the value dropdown again, it is slow again.
In the AfterUpdate of the Column combobox, I ReQuery the Value
combobox, thinking that it would load the data at that time. But it
appears that it doesn't actually load the data until the user clicks
the dropdown themselves. The following is the code I have in the
AfterUpdate event of the column combobox.
Me.cboValue.RowSourceType = "Table/Query"
strSQL = "SELECT DISTINCT " & strColumn & " " & _
"FROM " & QUERY_NAME & " " & _
"ORDER BY " & strColumn & ";"
Me.cboValue.RowSource = strSQL
Me.cboValue.Requery
I have thought about getting the Value dropdown to go ahead and
dropdown at the time it's ReQueried, but I think that would look ugly,
so haven't tried it yet. But I probably will, just to see if it helps.
Any ideas as to why this lag is there and what I can do to stop it?
Thanks,
Larry