View Single Post
Old 04-23-2007, 01:10 PM   #1 (permalink)
Gordon
Senior Member
 
Join Date: Nov 2006
Posts: 265
Gordon is on a distinguished road
Default Dulicating lines in a invoice report

Hello folks,

Need some techy MS Access people for this one.....hope there is someone here who can help.

am sure someone will have a simple answer to this.

I am building a simple invoicing tool. It records the clients details in a registration table, with a uniqe issues autonumber account number (with a primary key). The second table contains a list of products,

The form contains 2 parts

1) To list the customers and type in a customer orders number.
2) Sub-form to allow the customer to buy many products.

All works fairly well. Except in the sub form, there is a field that allows some notes to be typed into a box. Again that works ok. (We type dates into this field)

But if I add a second line with the same probduct and a different date, the lines double themselves on the report. But the final information that gets recorded onto a third accounts table is correct.

Here are some expamples of the sub-forms (not all the details, just the problem part)

Donughts, 27th April, 100, £0.15....
Donughts, 28th April, 150, £0.15...

The date field is manually added and products come from a reference table.

So far to good, when I press the button to create a report, it posts all the correct informtion to the apporiate table witht the correct amounts.

How the report will come out like this.

The field where the date gets added is called the date of service field.

Donughts, 27th April, 100, £0.15...
Donughts, 28th April, 100, £0.15...
Donughts, 27th April, 150, £0.15...
Donughts, 28th April, 150, £0.15...

So wheneven some extra text or dates are typed in the sub-form, the report seems to double the lines and give me the wrong invoice amount, and yet the correct amount will have been posted to the approriate tables. So only the invoice is wrong.

Hope someone can help.

Regards

Gordon
Gordon is offline   Reply With Quote