Results 1 to 6 of 6
  1. #1
    Join Date
    Oct 2008
    Posts
    5

    Unanswered: Open a form based on a value selected in a combo box

    Hello there

    I have form named "Drivers records" and i created a combo box nemd "MT Accidents" with values "YES" and "NO". If i select value "YES", i want another form named "Accidents" to open. And if i select "NO", no action should be taken and cursor go to the next field in the 1 st form (Drivers Records). Any help would be appreciated. Thanks in Advance

  2. #2
    Join Date
    Jan 2007
    Location
    UK
    Posts
    11,434
    Provided Answers: 10
    Code:
    If Me.[MT Accidents].Value = "YES" Then
        DoCmd.OpenForm "Accidents"
    Else
        Me.[Some field].SetFocus
    End If
    George
    Home | Blog

  3. #3
    Join Date
    Oct 2008
    Posts
    5

    Thanks

    Thanks George. It worked. Really appreciate your help

  4. #4
    Join Date
    Oct 2008
    Posts
    5

    Problem in reports

    Hi George

    can you tell me how to create a report only with the value "YES" from the previous post along with other field in the form. Thanks in advance

  5. #5
    Join Date
    Nov 2007
    Location
    Adelaide, South Australia
    Posts
    4,049
    Just use a where clause in the underlying query, ie WHERE [MT Accidents] = "YES"
    Owner and Manager of
    CypherBYTE, Microsoft Access Development Specialists.
    Microsoft Access MCP.
    And all around nice guy!


    "Heck it's something understood by accountants ... so it can't be 'that' difficult..." -- Healdem
    "...teach a man to code and he'll be frustrated for life! " -- georgev

  6. #6
    Join Date
    May 2013
    Posts
    1
    Hi George. I want to do the same thing as above. I want to open my subrecipient form if yes is selected. Was this done with the on click event procedure?

Posting Permissions

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