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

    Access Reports??? (2000)

    I am having a problem making a report in access. I am fairly new in access (and computers) but hope one day to be a Access developer. I built a data base for retail store purchases. I maid the receipt as a report, because that is how Northwinds has it. But I am having trouble getting the report to only have "one invoice" per report. in the detail section of the report, all my inviocies show up. I want only one record set to show up. I know it must be a simple solution, but I have been working on it for days. I looked at Northwinds and can't see any difference between theirs and mine. I am pulling all the info for the report from a quary just like Northwinds. My report sections are set up just like Northwinds. Any help would keep me from loosing my mind. Thanks!!

  2. #2
    New Lounger
    Join Date
    May 2002
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Access Reports??? (2000)

    I think your problem is that your query is extracting all the records from your database. You need to put a criteria in your query to restrict it to the one record (invoice) for your receipt. To do this set your criteria to something like
    =Forms!formname.invno where invno is the name (note name as in properties box right hand tag) of the text box on the form called formname which contains the invoice number. If it doesn't work try changing ! for .(period) and vice versa - they are always tricky but I think I have got it right.!

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

    Re: Access Reports??? (2000)

    It isn't clear how you're opening your report. Northwind uses a variety of methods to open reports, so that doesn't narrow it down too much. If you are opening the report from a form, the simple way to control the contents is to populate the WhereCondition argument of the DoCmd.OpenReport statement. You create the criteria string that you want to apply to the report, something like "[InvoiceID]=" & Me![InvoiceNum]. OF course, this assumes that the criteria you want to use is something like "InvoiceID=124", and you have a control on the current form called InvoiceNum, and the currently selected record has a value in that field of 124.

    Does that help?
    Charlotte

  4. #4
    New Lounger
    Join Date
    Mar 2002
    Posts
    7
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Access Reports??? (2000)

    I open the report with a command button. I have a quary "qryInvoiceFilter" that the command button uses. I was just now able to make only one invoice come out per reciept- But now when I hit the Command button "Print reciept" it promps me to put the Invoice number in. It is suppose to use the invoice it is on. The one thing that I believe is giving me the problem, is that there are 3 forms "frmCustomer",frmInvoice", and "sfrmInvoice_Details" The qryInvoiceFilter tells it to use [Form]![frmInvoice]![Invoice #] . The way the forms are is "sfrmInvoice_Details" is nested in "frmInvoice" witch is nested in "frmCustomer" The command button is in "frmInvoice" I don't know if that is any clearer. I noticed in Northwinds dBase that they only have one form nested. I think that is my problem.

  5. #5
    New Lounger
    Join Date
    Mar 2002
    Posts
    7
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Access Reports??? (2000)

    Any Suggestions would be helpful. I noticed if I open the one nested form. The one that has the command button on it -it works fine. It is just when I have the main form up that it promps me for the Invoice #. HELP

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

    Re: Access Reports??? (2000)

    I'm not sure I entirely understand, but if you're selecting the invoice from the subform, then your query has to reference the subform and you aren't using the correct syntax for that. If frmInvoice is being used as a subform, then you have to refer to it in the query as Forms!frmCustomer!frmInvoice![Invoice #] because otherwise, it's looking for an Invoice # on frmCustomer.
    Charlotte

  7. #7
    New Lounger
    Join Date
    Mar 2002
    Posts
    7
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Access Reports??? (2000)

    Thanks- That worked perfect! I didn't know you had to go through the complete path to get to it. From now on I will post to the original question. I new to this message board thing. Thanks for the help!!!

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

    Re: Access Reports??? (2000)

    Glad you got it working. <img src=/S/smile.gif border=0 alt=smile width=15 height=15>
    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
  •