total of an invoice to a table

Clivej01

Clive
Local time
Today, 23:45
Joined
Dec 18, 2006
Messages
10
I would like to create a table which stores the of all an invoice. at the press of a button. I want to use this to see how much I am Owed
 
invoice information

Uncle Gizmo said:
does your invoice have "line items"?
each line of the invoice will have
date wash--washset--cut--perm--water_colour-- mens_cut"or similar"
1-12-06 6.50 0.00 0.00 0.00 0.00 etc
12-12-06 0.00 5.00 etc

there is a total at the end of each line and then a total in the footer of the form. I want to put the total of the invoice in a table which has
Client ID, Invoice ID, Invoice Total

any help would be much appreciated.
I tried asking this questiob before but every one said that I don't need to do this. but i want my software to run this way, as it is easire to show whoe owes what??

Regards


Clive
 
Via code, you would add a record to the table. Replace the variables with the appropriate ones. Green denotes the form field names, red denotes the table field names.

dim rs, db
Set db = CurrentDb()
Set rs = db.OpenRecordset("TableName")
with rs
.AddNew
!ClientID = ClientID
!InvoiceID = InvoiceID
!InvoiceTotal = Total
.Update
End With
rs.Close


Alternatively, you could use an 'Append' Query to do the same.

But I'll go on record and suggest that this isn't the ideal solution. Without a lot more coding, you will end up with multiple entries for Clients and Invoices.

Why don't you just create a report that does the same thing, without needing to append to a table? Then, your information will always be current, with no duplicates.
 
It's bad design to store a value that can be calculated any time you need it.
 

Users who are viewing this thread

Back
Top Bottom