Results 1 to 2 of 2
  1. #1
    New Lounger
    Join Date
    Jan 2002
    Location
    Irvine, California, USA
    Posts
    6
    Thanks
    0
    Thanked 0 Times in 0 Posts

    ComboBox (Access 97)

    I have two combo boxes, cbo1 and cbo2. User must select cbo1 before making a selection from cbo2. I would like to display a message stating "you must choose from cbo1 before selecting from cbo2, when the user tries to select from cbo2 before cbo2. I tried using the "On Click" event, but it did not work. Is there another event I should be using?

  2. #2
    Gold Lounger
    Join Date
    Feb 2001
    Location
    Sint Niklaas, Belgium
    Posts
    2,778
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: ComboBox (Access 97)

    In the On Got Focus of Combo2 enter:
    <pre>Private Sub Combo2_GotFocus()
    If IsNull(Me.Combo1) Then
    MsgBox "Enter something in Combo1"
    Me.Combo1.SetFocus
    End If
    End Sub
    </pre>

    Francois

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •