Copy last records from subform as new entries in subform

MvdBergh

New member
Local time
Today, 08:30
Joined
Apr 9, 2012
Messages
5
I have developed a small db (MS Acess 2007) handling Patient Filing and Invoicing.
As with db’s, it is never complete as users' needs always change for more functionality, felxibility and ease of use.
The invoicing is setup as follow:
I have two tables:
1 - Main Table: Invoice (InvoiceID = Primary Key)
2 - Sub Table: InvoiceDetails (InvoiceDetailsID = Primary Key) and is linked to the Main Table via a field InvoiceID.
Both have forms with the same names as the table names.
On the Main form (“Invoice”) the patient name is selected from a dropdown box and a subform, wherein the invoice credentials are captured, opens with the following fields:
InvoiceDetailsID
InvoiceID
ServiceDate
ServiceDescription
Dep#
ICD10Code
ServiceFee

The need is as follows:
1. Upon activation of the subform, the db should check whether there was a previous invoice issued for the patient and only then
2. display a message box wherein the user is ask whether he/she wants to copy the previous invoice details to the new invoice.
3. If “yes” is selected, then the information of the previous invoice is to be copied with the exception to the “ServiceDate” which is to display today’s date.
I have tried an append query without success and would prefer if VBA code is used to accomplish this task.
Any assistance in this regard shall be highly valued as I am still new to Access.
 

Users who are viewing this thread

Back
Top Bottom