• Parameter Query, Dialog Box Problems

    Author
    Topic
    #355094

    I am trying to make a parameter query that uses a dialog box to get criteria from user input. I have a query that simply has 3 fields – Company, Target, and Notes. I want to filter the Target field on the query.

    I’ve created a dialog box that is bound to the query. It is named “Company Target Query”. I’ve put a field on the box bound to Target, I’ve named the control Target.

    The problem is when I put the expression Forms![Company Target Query]![Target] into the criteria of the query. As soon as I moved out of the criteria field or run the query Access insists on putting brackets around the word Forms, so that I get a parameter dialog box instead of my custom dialog box. It’s driving me insane. I’ve tried variations on almost all the options (renaming the control on the form, renaming the form, using the word FORM instead of FORMS, etc.) I can’t make it work.

    Any suggestions would be greatly appreciated. I’m using Access 2k SR1. Thanks.

    Viewing 0 reply threads
    Author
    Replies
    • #523133

      Whoops. I thought I looked everywhere but I just found another post dealing with my problem.

      MS helps makes it sound as if I should run the query which will pop up the dialog box. However, this is backwards. I am to run the dialog box, then open the query.

      • #523161

        I simplified the whole mess by creating a form for the user to input their criteria. This form just edits the information in a table that contains only one record. (No records can be added or deleted, only changed.) The fields from this table are pulled into the query and used as my criteria – no relationships are needed. After the user enters their choices in the form, a button-run macro closes the form and runs the desired query.

        No serious coding required. smile

    Viewing 0 reply threads
    Reply To: Parameter Query, Dialog Box Problems

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: