Add a "Do Not Save" Option to a Data Entry Form with Multiple Subforms

CarlyS

Registered User.
Local time
Today, 13:49
Joined
Oct 9, 2004
Messages
115
Hi Everyone,
There may be a quite simple answer to this, but I am a novice.

I have a data entry form with multiple subforms and subsubforms. People sometimes enter their data and then realize they are on the wrong form or some other such problem and they want to undo all the data entry they have just done.

My goal is to delete the relevant records from the ultimate table that this data will end up in.

The data entry form works like this:

Mainform has this important field on the 1 side of the one to many relationship:
NameDateWeekday

The first subform is based on a query that will provide information specific to that weekday and time of day. It has its own subform which will take that information and allow for data entry for other pieces of information. NameDateWeekday is also on the subforms (the many side of the relationship).

There are 12 other subforms like this for 12 other times of day. The only data that is stored is the data on the subsubforms, which all store their data in the DataEntryTable.

I would like to delete all fields in DataEntryTable that have the same NameDateWeekday if a person clicks on "Do Not Save."

Does anyone know a way to accomplish this?

Carly
 
Make sure that you have defined relationships and enforced Referential Integrity between them. You must also specify Cascade Delete. Then when the do not save button is pressed, you can delete the parent record and that will cause the related child records to also be deleted.
 

Users who are viewing this thread

Back
Top Bottom