Report for Sales Invoice

ksng1760

New member
Local time
Tomorrow, 04:18
Joined
Jan 5, 2005
Messages
7
Hi there,

I hope any of you can help me with this prob.I have done up a sales invoice database and would like to use report to print direct sales invoice. However, the sales invoice report prints out all entries. Can anyone pls help? Thanks
 
ksng,

Put a Command Button on your form with this code in its OnClick event.

Code:
                       +-----  Your report's name
                       |                +--- Your table's primary key
                       |                |                    +-- The field on your form
                       |                |                    |
                       V                V                    V
DoCmd.OpenReport "YourReport",,,"[InvoiceNumber] = " & Me.InvoiceNumber

If your primary key was a string:

DoCmd.OpenReport "YourReport",,,"[InvoiceNumber] = '" & Me.InvoiceNumber & "'"

If your primary key was a date:

DoCmd.OpenReport "YourReport",,,"[InvoiceNumber] = #" & Me.InvoiceNumber & "#"

Wayne
 
Sales INvoice Report

Hi. Thanks for your help wayne but what I meant was to print an invoice report which shows only entries from a specific invoice number and not entries from the whole databse. Can u pls help? Thanks
 
Sales Invoice Report

Have you tried creating a query and in the Invoice Number field enter [Enter Invoice Number] in the criteria.

Then base your report on the query.

When you run the query a box should popup. Enter an invoice number and you should get the inoive for that number only.
 
ksng,

My last post will print only the ONE invoice that is displayed on the form.
That's where the Me.InvoiceNumber comes in.

Wayne
 

Users who are viewing this thread

Back
Top Bottom