Results 1 to 6 of 6
  1. #1
    Join Date
    Feb 2004
    Posts
    32

    Unanswered: Parameter Query, can't get rid of dialog

    I followed the instructions on Run a parameter query within an Access form | Microsoft Office | TechRepublic.com but when I enter text in the field, then click the button, the parameter dialog box pops up requiring the text to be entered again. Once I do that, the query runs fine but I don't want the dialog popping up again.

    What did I do wrong?
    Jules

  2. #2
    Join Date
    May 2005
    Posts
    1,191
    Can you post the actual text of your SQL? It's hard to diagnose without seeing the problem

    Cheers!
    Me.Geek = True

  3. #3
    Join Date
    Feb 2004
    Posts
    32
    Private Sub getPolyids_Click()
    On Error GoTo Err_getPolyids_Click

    Dim stDocName As String

    stDocName = "qryPolyID"
    DoCmd.OpenQuery stDocName, acNormal, acEdit

    Exit_getPolyids_Click:
    Exit Sub

    Err_getPolyids_Click:
    MsgBox Err.Description
    Resume Exit_getPolyids_Click

    End Sub
    Jules

  4. #4
    Join Date
    Feb 2004
    Posts
    32
    Ooops, did you mean this instead?

    SELECT DISTINCT EAS_data.twp
    FROM EAS_data
    WHERE (((EAS_data.[2-dot])=Forms!qyrFormPolyID!txt2dotNum));
    Jules

  5. #5
    Join Date
    Feb 2004
    Posts
    32
    Got it! (Stupid me)

    I had a typo in the form name so I changed it but didn't change the query reference to the form, I thought the form name change would cascade through the application.

  6. #6
    Join Date
    May 2005
    Posts
    1,191
    um, glad we could help
    Me.Geek = True

Posting Permissions

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