Deleting records from forms and subforms

K

Kev Spick

I have a data entry form containing a subform. I have
created a Delete button using the wizard but when i click
it i get an error that the subform contains related
records. Does anyone know a way that i can create a button
that deletes a record and also the related subform records
entered?
 
A

Allen Browne

From the Tools menu, choose Relationships.

In the relationships window, there should be a line joining the main form
table and the subform table. Double-click it. Check the box for "Cascading
Deletes".

Now whenever you delete a record from the main table, the related records in
the secondary table will also be deleted.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top