11 replies
by bowjangles
by tonyd
by bowjangles
by bowjangles
by bowjangles
by indimulie
Creae a query which will include the fields in the current form and subforms then try working with a recordset from the query which you can update using Code. If you dont want any changes you can use the cdancelupdate method of the recordset.
Hope this sorts out your problem
by bowjangles
by bowjangles
by it_cowboy
The very nature of Access is to save data once you leave a record. Considering this, you may need to approach it from a different angle...
Add another field to the table under Sub1 called something like 'ToBeSaved' as a Yes/No field. Set the default value to Yes and do not make the field viewable or changeable. This means when a new record is created, the value in this field will be Yes.
When you exit Sub1, the record will be saved, but the 'ToBeSaved' value will be Yes.
Whatever action you want to undo the changes, just run a delete query on the table under Sub1 to remove all records where the 'ToBeSaved' field is Yes.
When you click whatever button to save the record to keep the changes, change the value of this field to No with an Update query.
The only way you can really achieve what you want to do is in code using Begin Trans, Commit and Rollback on the Workspace object.
Hope this helps....
by bowjangles
by bowjangles
This discussion is closed to new replies.
Trending Software posts
Sort by Trending