Dear Joe.
I do have 3 separated tables each one contains 8 fields
1st is := Invoices
2st is = Payments
3rd is := customers
what they asked me for is a statement of account of a every customer merge by the payments for example
Date invoice_amount Payments Account customer ID
1/1/1998 200 0 200 1
1/2/1998 0 100 100 1
1/3/1998 100 0 200 1
What I was trying to do is to fill all the data in 1 recordset so I can sort this record set by date and print out ????
NB: I didn't save the customer account any place.. is my logic true ? is there any better way to do it ? Do I have to change table relation? I was wondering if payments field must be in the same table as invoice?
Kindly I would like to have any comments that can help me to proceed on this reports
I am waiting for your reply,
WASSIM S DACCACHE
Ok Wassim,
Instead of re-inventing the wheel again, less simplify this situation a great deal.
If all this items from Customer, Invoices, and Payments are all in tables, then you simply need to create a query, that will show the items that you need in the report, without having to go through creating a Recordset. Recordsets are only if you're programming in VBA and you have no need at this point to do that.
This a very simple query that you can write in the Query Designer in Acccess.
Simply show the three tables that you're talking about, and create the relationships between them, by dragging the key value from the Customer table to the Primary Key of the Invoices, and then Dragging the Customer ID number to the customer ID in the Payments Table so as to show what payments where made by the customer.
Then simply select which fields you want to display, and sort as needed, and when creating your report, just select the query you created as the datasource for the report.
Then that way you'll have all the information that you need.
Hope that helps,
Joe P.