I want to run a code everytime I delete/add a record in the subform. I need to know the amount of records there are in the subform after delete/add event.
for instance. on the delete/add event, if there is 1 or more records, run code A.
if there is no record, run code B.
I’m basically running DCount("tableName")
to return the number of records from the subform source table.
the problem is that if I place this verification code in the Delete
/AfterInsert
events, the code runs for each record in the table. if there are 7 records, the code will run 7 times.
I’d appreciate your help, please.
thanks in advance.