Results 1 to 5 of 5
  1. #1
    Join Date
    Mar 2008
    Posts
    13

    Unanswered: Creating New Report

    I'm creating a report to print an invoice using the info that was just entered into the order form and not sure where to begin. Is in better to just design the form to look like an invoice and then print the form when finished entering the data on the form?

    I first thought that I would use my query as the record source of the report but then realized that I only want the data that was just entered on the form.

    The Order Form will have a command button to print the report.

    Can you point me in the right direction to get started?

    Thanks

  2. #2
    Join Date
    Dec 2004
    Location
    Madison, WI
    Posts
    3,926
    I made an invoice type of db once and found it very helpful for the users to design the report to look just like the form with a button on the form to quickly preview the report from current record on the form.

    Also, I always request the paper copy that is filled out and use that as a template for the data entry form. Users like to see the data entry form to flow just like the paper copy (it also helps in in creating the fields for the table(s) by looking at what fields are tracked on the paper copy.)

    The report should have a recordsource query that's something like this....

    Select * from mydatatable where IDField = " & Forms!MyDataEntryForm!IDField & ""

    You should also always open the report in a preview mode and let the users then select the print button on the menu.
    Last edited by pkstormy; 04-05-08 at 20:42.
    Expert Database Programming
    MSAccess since 1.0, SQL Server since 6.5, Visual Basic (5.0, 6.0)

  3. #3
    Join Date
    Nov 2007
    Location
    Adelaide, South Australia
    Posts
    4,049
    Is in better to just design the form to look like an invoice and then print the form when finished entering the data on the form?
    No. Design a report to do printing. Leave forms to do data entry.

    Don't forget to save the record first up when you click the button, then get the code to open the report, as suggested by pkstormy
    Owner and Manager of
    CypherBYTE, Microsoft Access Development Specialists.
    Microsoft Access MCP.
    And all around nice guy!


    "Heck it's something understood by accountants ... so it can't be 'that' difficult..." -- Healdem
    "...teach a man to code and he'll be frustrated for life! " -- georgev

  4. #4
    Join Date
    Mar 2008
    Posts
    13
    I've played around with this a bit and found that adding text boxes to the report and using a control source like this works.

    =DLookUp("[Name]","[tblMember]","[MemberID] = " & Forms("frmOrders")("[MemberID]"))

    Although, the subform, I using this because the DLoopUp function was not working properly because I didn't write the code correctly:

    =Forms!frmOrders![tblOrderDetails Subform].Form![Item Description]

    Now the subform has all the items that the person is ordering which could be several lines. The report as is, only picks up the last line and only if the user has not hit enter to go to the next line.

    I thought that I could fix this by calling everything associated with that OrderID but I didn't know how to reference they last OrderID created.

    Is this the wrong way to do this? I haven't spent too much time on it so far, so I can start over.

    Thanks

  5. #5
    Join Date
    Mar 2008
    Posts
    13
    I figured out how to find the last OrderID that was created and was able to reference that in all my controls on my report. I do have another problem but will start a new thread.

    Thanks

Posting Permissions

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