M
miss031
I am not sure if this is even possible, or necessary. With one button click,
I would like to update and append to several different tables with data
dependent on each other:
1. Check tbl_customer_invoice to see if there is already an invoice for this
customer:
a) If not, append a new record to that table to create an invoice number
b) If so, do nothing, because the invoice already exists
2. Take the newly created, or found invoice number from that table, and
insert it with the rest of the line_item data in the tbl_line_items
3. Get the total of all of the line_items with that invoice number, and
insert it into the tbl_activities as a payable invoice total.
I think I should be using DLookup, right? But I think that that is supposed
to be slow if there are many records, which there will be.
If anybody knows of the best way to do this, I'm all ears.
I would like to update and append to several different tables with data
dependent on each other:
1. Check tbl_customer_invoice to see if there is already an invoice for this
customer:
a) If not, append a new record to that table to create an invoice number
b) If so, do nothing, because the invoice already exists
2. Take the newly created, or found invoice number from that table, and
insert it with the rest of the line_item data in the tbl_line_items
3. Get the total of all of the line_items with that invoice number, and
insert it into the tbl_activities as a payable invoice total.
I think I should be using DLookup, right? But I think that that is supposed
to be slow if there are many records, which there will be.
If anybody knows of the best way to do this, I'm all ears.