Invoice reports

Elephant

Registered User.
Local time
Today, 19:16
Joined
Nov 22, 2002
Messages
52
I am making a datbase for a travel company and want to add a command into a Form where the Order is kept, a command which will preview the invoice for that particular OrderId.
I can't seem to manage to do it - just for the specific OrderId I am working on.
Any ideas?
Thanks
 
If you've got a table as the underlying source for the report, you will need to create a query.

In design view of your query you need to enter the following in the criteria row of your OrderID field.

[Forms]![NameOfForm]![OrderID]

You will have a command button as normal to open your report and the query criteria you've entered will sort the linking for you.
 
You can also use the Where clause of the Open Report method
 
Invoice reports - Ally

Hello Ally,

Thanks very much for your reply.

Just to be sure I am doing things right, I have done this :

Form for the "Orders", with sub-form for the "Order Details"
Query called "InvoiceReport", from which I made the Report called "Invoice".
On the Orders form, I have made a command button which automatically prints off the invoice for that particular order, and also one to Preview invoice.
Following your instructions I made a second query called "Invoice Report Query" - this I based on the "InvoiceReport" query above, giving 2 fields (ie, "InvoiceReport.*" and "OrderId", which I added in your criteria [Form]![Order]![OrderId] ...

Am I right so far?

I did as above but when I pressed on "Print invoice" (from the "Orders" form, it printed ALL the current Order invoices, not just the one I wanted ....


Thanks for your help again
 
Not entirely sure why you've got the second query. Are you looking for OrderID from the main form or the subform?

Are you able to post an attachment?

Have you tried Rich's suggestion?
 
Invoice report

Hello again Ally,

I don't know either why I had the second query (!). I deleted that, and put the [Forms]![Orders]![OrderID] directly into the OrdersID part of the Invoices Query that the Invoice report is made up from - don't know why I didn't do this first!! - now it works fine!

THANK you very much indeed ....
 

Users who are viewing this thread

Back
Top Bottom