which event to use

E

Eric

Morning all
Scenario is Main form with list box. when selection is made an unbound form
is used to enter data to another subform(of the main form) This one updates
the table as required. It is set up to update only when the last field is
entered via a combobox on the unbound form (OnClick). I wish to update
another table with data as well and have done it with SQL. but am running
into duplicate data error. First field on table is invoice number ( no
duplicates) second field is treatment number.(duplicates OK)
The second subform is a record of Procedures and can contain multiple
procedures per treatment.
I wish to update the Invoice/TreatmentNumber table only if there has been a
treatment (which I know when the combobox Treatments has been done). This is
where I have had the code but of course everytime it goes to add another
record to the invoiceTreatment table it is a duplicate.
From the first drop dopwn listbox on main form I have a command button to
'accept' SELECTED patient .
Can I use some event of this to check if new client then update table - If
so Which one!?
Any other ideas appreciated
Thanks
eric
 
Top