Results 1 to 3 of 3
  1. #1
    New Lounger
    Join Date
    Apr 2001
    Posts
    21
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Parameter Query, Dialog Box Problems

    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.

  2. #2
    New Lounger
    Join Date
    Apr 2001
    Posts
    21
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Parameter Query, Dialog Box Problems - Solved

    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.

  3. #3
    5 Star Lounger
    Join Date
    Feb 2001
    Location
    Youngstown, Ohio, USA
    Posts
    705
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Re: Parameter Query, Dialog Box Problems - Solved

    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. <img src=/S/smile.gif border=0 alt=smile width=15 height=15>

Posting Permissions

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