Problem with invoicing using a subform

Z

zugzy

I am having problems with a form for which i am using to create invoices

The problem i am having is once i have entered the items sold in the subform
and click a command button to print the invoice via a report, for some weird
reason the items entered are re-arranged in a completely different order. Can
anyone tell me why this is happening and what i can do to stop this from
happening

Any help will be much appreciated

Thanks
zugzy
 
A

Allen Browne

You need a way to define the order of the items, so it is consistent.

You probably have 2 tables:
- Invoice, with an InvoiceID primary key (for the main form), and
- InvoiceDetail (for the line items in the subform.)

If you don't have an AutoNumber field in InvoiceDetail, add one.
Now open the report in design view.
Open the Sorting And Grouping dialog (View menu.)
Add an extra row to the dialog, based on the InvoiceDetailID autonumber.

The report will now print out the invoice with the line items in the same
order they were entered.
 
Z

zugzy

Thankyou for your reply

I will try your suggestion

Hopefully this will be the solution to my problem, it seems like it will do
the trick

Regards
Zugzy
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top