combobox.dropdown event not working after error

Joined
Mar 29, 2010
Messages
1
Reaction score
0
I am designing an interface in access that will be used on a touchscreen device, so I am attempting to make it as easy as possible.

the problem:

I have a combobox based on a table - LimitToList set to yes with automatic dropdown
Code:
Private Sub Gear_Type_GotFocus()
Me.Gear_Type.dropdown
End Sub
The first problem I encountered was the ability to simply tab through the combo box (leaving a null value) and limit to list was not trapping the null, so I set on exit code to check for null or "", and display a messagebox.
Code:
If IsNull(Me.Gear_Type.Value) Or Me.Gear_Type.Value = "" Then
MsgBox "PLEASE SELECT ONE OF THE LISTED GEAR TYPES", vbCritical, "GEAR TYPE ERROR"
Response = cDataErrContinue
Me.Gear_Type.SetFocus
Me.Gear_Type.dropdown

The 2nd problem is I cannot get the combo to use .dropdown after an error, I have tried moving to another control and then back to the combobox control but the .dropdown still does not fire. I have also tried adding a custom function and adding it to the OnCurrent Event of the form, still not working.

Code:
Public Function dropdown()
Application.Screen.ActiveControl.dropdown
End Function
Any thoughts on how to force the .dropdown to fire on the combobox after an error?
progress.gif
 
Last edited:

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top