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
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.
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.
Any thoughts on how to force the .dropdown to fire on the combobox after an error?
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
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
Last edited: