Results 1 to 2 of 2
  1. #1
    perlyman is offline Novice
    Windows 7 Access 2007
    Join Date
    Mar 2010
    Posts
    1

    combobox.dropdown event not working after error

    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 = acDataErrContinue
    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?

  2. #2
    llkhoutx is offline Competent Performer
    Windows Vista Access 2007
    Join Date
    Jan 2010
    Location
    Houston, Texas USA
    Posts
    373
    Search this site for NotInList code and use it to solve your problems

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Not In List event not working
    By Bruce in forum Forms
    Replies: 1
    Last Post: 03-12-2010, 02:24 PM
  2. Replies: 0
    Last Post: 12-16-2009, 01:14 PM
  3. Dropdown - need help please
    By sullyman in forum Access
    Replies: 8
    Last Post: 10-26-2009, 07:48 PM
  4. How to make a Column in Access a DropDown
    By JohnGrove in forum Access
    Replies: 4
    Last Post: 03-10-2009, 07:56 AM
  5. Drop Down, link to another dropdown
    By davelliott in forum Forms
    Replies: 3
    Last Post: 05-23-2006, 08:05 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums