Best way to automatically add records to a table (i.e. trigger)

Bratvold

New member
Local time
Yesterday, 21:16
Joined
Feb 7, 2007
Messages
7
What is the best way to detect a new record in VBA code?

.newrecord isn't exactly what I want either.

What I want is when a record is added to a table I want to automatically add 4 records to another table.

Thanks.
 
Access does not support triggerrs. How is the record going to be added? With a form? If so you can program the form to add your 4 records.
 
KeithG said:
Access does not support triggerrs. How is the record going to be added? With a form? If so you can program the form to add your 4 records.

The main record is going to be added in a form, but what I'm finding is that the related records can't be added until the main record is added (I have relationships setup). That's a catch 22 because in order to finalize the record I have to leave the form.
 
It sounds like you have referential integrity inforced on your relationship. What you are trying to do violates referential intergrity and is producing the error. So if you don't enforce RI you should be able to achieve you goal.
 
KeithG said:
It sounds like you have referential integrity inforced on your relationship. What you are trying to do violates referential intergrity and is producing the error. So if you don't enforce RI you should be able to achieve you goal.

That worked. I would like to maintain the forced integrity, but if I can't...I can't.

Thanks.
 
Yeah I always force RI but in your situation I don't think it is possible.
 

Users who are viewing this thread

Back
Top Bottom