MS Access Query Criteria Form Does Not Display

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • erog
    New Member
    • May 2010
    • 5

    MS Access Query Criteria Form Does Not Display

    Hello

    I've tried using the MS Access Northwind sample DB and I've downloaded a few other sample Microsoft Access DBs from their website. I keep on running into the same problem for trying to retrieve user input from a query form.

    In the Northwind DB, there is a query named "Invoices Filter". In the criteria for the OrderID field in the Invoices table, the following is entered: [Forms]![Orders]![OrderID]

    I understand that for this field, it's trying to retrieve user input from the form "Orders" based on the "OrderID" field. But when I double click the "Invoices Filter Query", the form does not display. What happens is that the default dialog box appears with "Enter Parameter Value" as the form caption, a label "Forms!Orders!O rderID", a textbox and an OK command and Cancel command (in the attachment). Why isn't the "Orders" form opening when I double click the Invoices Filter query? Is there something wrong with my settings?
    Attached Files
  • TheSmileyCoder
    Recognized Expert Moderator Top Contributor
    • Dec 2009
    • 2322

    #2
    Welcome to Bytes
    That query is meant to be used while the form is allready open. If I recall correctly the query is used to fill a subform of the Orders form. Since the form is not open, the query can not access the data, and that is why it is asking your for a input.

    Tell us a bit more about what you are trying to accomplish and we might be able to help you better.

    Comment

    • erog
      New Member
      • May 2010
      • 5

      #3
      Hi SmileyOne

      Thanks for the quick reply. I'm following this tutorial:


      This tutorial is very similar to what I want to do. Instead of having a dropdown box, I would like to have Yes/No checkboxes. I already have yes/no fields in one of my tables called "Project Leads". Anyways, in step 2.3 in the tutorial, it says I can "Test the query" by pressing the Run button on the toolbar. I thought that if I double clicked the "Invoices Filter Query" this would open the form according to this tutorial.

      Would I have to insert the OK and Cancel commands on my custom "Filter dialog box" in order to filter my results based on whichever yes/no fields are equal to -1? Then in the query criteria I would have something along the lines of [Forms]![frmFilterLeads]![chkJoeReed] for each record?

      Please note: I am using MS Access 2002 so this may be a newer version.

      Comment

      • erog
        New Member
        • May 2010
        • 5

        #4
        Ok got it working... That wasn't that hard. I spent my whole morning looking at settings and why this wasn't working in the Northwind and other tutorials. The tutorial above it must be using a more recent version of access.

        The bad thing about checkboxes is that there can be three values:
        0/-1/Null
        I may try to change it to a listbox.
        Having 0 and -1 user responses will more likely give unwanted results. Thanks SmileyOne

        Now how can I get a report to display instead of the query.........?

        Comment

        • erog
          New Member
          • May 2010
          • 5

          #5
          just got the report working too :)

          Comment

          • TheSmileyCoder
            Recognized Expert Moderator Top Contributor
            • Dec 2009
            • 2322

            #6
            Sounds good.

            Comment

            Working...