Need help making button

Discussion in 'Access Forms' started by jmuirman, Feb 14, 2006.

  1. jmuirman

    jmuirman Guest

    I created a button on a form to run a query. However, when the query question
    window pops up I put in the criteria and enter and then it pops up again -
    How can I stop the double pop-up?

    Thanks,

    John
     
    jmuirman, Feb 14, 2006
    #1
    1. Advertisements

  2. jmuirman

    Rick B Guest

    Does the same thing happen when you run the query by itself, or only from
    the button? Is there criteria in the code behind your button that does not
    match the criteria in the actual query. For example...

    =[Enter Date:]

    in the query and

    [EnterDate]

    in the vba code?
     
    Rick B, Feb 14, 2006
    #2
    1. Advertisements

  3. jmuirman

    jmuirman Guest

    Thanks,

    John

     
    jmuirman, Feb 14, 2006
    #3
  4. jmuirman

    jmuirman Guest

    The query runs fine with only one criteria pop-up. Thought I had it - but
    it's doing it again - here's my vbc:

    Err_Command101_Click:
    MsgBox Err.Description
    Resume Exit_Command101_Click

    End Sub
    Private Sub Command102_Click()
    On Error GoTo Err_Command102_Click

    Dim stDocName As String

    stDocName = "qContacts - EMAIL BY TYPE"
    DoCmd.OpenQuery stDocName, acNormal, acEdit

    Exit_Command102_Click:
    Exit Sub

    Err_Command102_Click:
    MsgBox Err.Description
    Resume Exit_Command102_Click

    End Sub

    Thanks,

    John
     
    jmuirman, Feb 14, 2006
    #4
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.