Results 1 to 3 of 3

Thread: [RESOLVED] Check for ComboBox selection code?

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Nov 2005
    Location
    Oxford UK
    Posts
    76

    Resolved [RESOLVED] Check for ComboBox selection code?

    I'm a bit lost for what I put in place of the ? in this code. I want to check if combobox1 selection has been made but combobox2 has no selection then to bring up message.
    Code:
    If Me.cmbReason.Value = ? And Me.cmbDes.Value = "" Then
      Me.cmbDes.SetFocus
      MsgBox "Please enter Description"
      Exit Sub
     End If

  2. #2
    Addicted Member
    Join Date
    Jan 2002
    Location
    Glasgow, Scotland
    Posts
    202

    Re: Check for ComboBox selection code?

    VB Code:
    1. If Me.cmbReason.Value <> "" And Me.cmbDes.Value = "" Then
    2.   Me.cmbDes.SetFocus
    3.   MsgBox "Please enter Description"
    4.   Exit Sub
    5.  End If
    if you fail to plan, you plan to fail

  3. #3

    Thread Starter
    Lively Member
    Join Date
    Nov 2005
    Location
    Oxford UK
    Posts
    76

    Re: Check for ComboBox selection code?

    Simple, makes me feel so stupid. Thanks

Posting Permissions

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



Click Here to Expand Forum to Full Width