Results 1 to 3 of 3
  1. #1
    New Lounger
    Join Date
    Mar 2002
    Posts
    7
    Thanks
    0
    Thanked 0 Times in 0 Posts

    ???quary Filter (2000)

    OK- Here it is- The problem the made me lose my mind!!! I Have been working on this four hours and still can't get it. I posted it in my other post-but because I am new to access and programming and developing. I probley didn't explain it right. I will now try to explain it better. Thank you everyone for your patience!! I built a dBase in access (only my second one ever) and I am have a problem getting it to print out a Receipt. I have it set up like Northwinds order invoice. I have a quary that pulls the data from the different tables. Then I use that quary as a filter. The name of the quary is "qryInvoiceFilter" I than made a command button on the invoice to print the receipt (print report). I than added the following code in the command buttons "on Click" DoCmd.OpenReport strDocName, acViewNormal, "qryInvoiceFilter" What I believe this is suppose to do is print the report using the qryInvoiceFilter to take the data from that record and print it. In my qryIvoiceFilter I have the critiaria set up like this [Forms]![frmInvoice]]![Invoice #] This is suppose to retrieve the data from the form that you are on. I think my problem is that frmInvoice is a subform of frmCustomers. There are 3 forms - frmCustomers than frmInvoice is a subform of (frmCustomers) than sfrmInvoice_Details that is a subform of "frmInvoice" If I open up the frmCustomers and try to print the receipt a "Enter paramiter Value" box appears-If I enter the Invoice # than it prints. Now if I open up the frmInvoice directly and hit the command button it prints the receipt out with no problems. Northwinds only has a form and a subform not 3 like me. My cmdButton is on the 2nd form- not the main one. I'm sure it is a simple fix- but it is kicking my butt!!! Please can anyone help. I am a Marine and on camp Lejeune, I can't find anyone here that knows how to develop access.

  2. #2
    5 Star Lounger
    Join Date
    Jan 2001
    Location
    Vancouver, Br. Columbia, Canada
    Posts
    632
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: ???quary Filter (2000)

    Sometimes finding the correct name for a control is difficult. Here's an easy way to get the correct name of the control for your query:

    Open the query in design view and click in the appropriate Criteria column. Then right-click and choose Build... which will open the Expression Builder. Drill down through the Forms entry to find your main form, and then drill down into the subform. Select the appropriate control from the subform.

    HTH
    --------------------------------------------------
    Jack MacDonald
    Vancouver, Canada

  3. #3
    Plutonium Lounger
    Join Date
    Dec 2000
    Location
    Sacramento, California, USA
    Posts
    16,775
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: ???quary Filter (2000)

    I'm going to lock this thread and ask that any replies be posted to the original thread here. As I pointed out in the original thread, the query has to properly address the subform, and it isn't doing so as you described it. You can find the correct syntax in my response here.

    In general, it's better to continue the original thread rather than asking the same question in a slightly different way and getting partial answers in several locations.
    Charlotte

Posting Permissions

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