Results 1 to 3 of 3
  1. #1
    Join Date
    Jul 2008
    Posts
    2

    noob prob, generating next report

    I am trying to make (print) an invoice based on a work order. I have looked through some examples but am missing something. I have put a command button in to print a report but I don't know how to load the report with the new record. I am assuming I do this using a query some how? any help


    Thanks

  2. #2
    Join Date
    Jul 2008
    Location
    Alexandria, Egypt.
    Posts
    38
    Dear flash319,

    You need to click a button to print ONLY the invoice related to the current work order ... is that right??

    Your report must be based on a query ...

    I will assume the following names and when you apply use your objects names:

    The user form WORK_ORDER_FORM
    Report INVOICE
    Tables: WORK_ORDER and INVOICE both tables contain the same filed WORK_ORDER_NO

    Open INVOICE report in design view
    Press Alt+Enter to open report properties
    In data tab ... record source ... the existing value is INVOICE which means the report data source is INVOICE table
    Click on the button on the right of record source (...) this will open the query builder
    Add all fields in the table to the query
    In WORK_ORDER_NO field write the following in criteria:
    Forms![WORK_ORDER_FORM]![WORK_ORDER_NO]
    Close the query builder
    Save

    Open WORK_ORDER_FORM in design view
    Insert command button
    From wizard choose Report operation / print report
    Choose the report INVOICE
    Click finish
    Save

    Now if you open the form and choose a work order
    When you click on the button ... the invoice related to the current work order will be printed.

    Please try and give me feedback

    Thanks

    Ahmed

  3. #3
    Join Date
    Jul 2008
    Posts
    2
    Thanks, worked great!

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 0
    Last Post: 10-24-2008, 11:20 AM
  2. Replies: 2
    Last Post: 09-01-2006, 04:03 PM
  3. report prints blank page at end of report
    By darrellx in forum Forms
    Replies: 0
    Last Post: 03-14-2006, 08:51 PM
  4. generating random numbers on form
    By anitra in forum Forms
    Replies: 1
    Last Post: 02-14-2006, 10:08 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums