Updates in forms and subforms

J

Jess

I have a form with multiple subforms (subformA, subformB, subformC). All
these subforms display data related to the main form, which has the “master
recordâ€.

If would like my users to have the option to roll back the changes after
updating information in any subform or the main form. The only approach
coming to my mind is to implement a warning message in the form_beforeupdate
event subroutine of every subform and the main form.

The downside to this approach is that my users will see a warning message
every time a subform or the main form has been updated. This is unacceptable
since I have many subforms. I do not want my users to be asked the same
question all the time.

I would like this warning message to be shown just once whenever the user
shuts down the main form or browses away to another record in the main form.

Can anybody suggest me a good/better approach to accomplish this?

Thanks in advance
 
A

Armen Stein

I have a form with multiple subforms (subformA, subformB, subformC). All
these subforms display data related to the main form, which has the “master
record”.

If would like my users to have the option to roll back the changes after
updating information in any subform or the main form. The only approach
coming to my mind is to implement a warning message in the form_beforeupdate
event subroutine of every subform and the main form.

The downside to this approach is that my users will see a warning message
every time a subform or the main form has been updated. This is unacceptable
since I have many subforms. I do not want my users to be asked the same
question all the time.

I would like this warning message to be shown just once whenever the user
shuts down the main form or browses away to another record in the main form.

Can anybody suggest me a good/better approach to accomplish this?

Thanks in advance

As you have seen, Access automatically saves records when you move
from one form/subform to another.

If you want complete control, you will have to base everything on a
set of work tables that you load when your form first opens, then
control whether all those changes are updated in the main tables when
the form is closed. You could use OK and Cancel buttons to implement
this.

But this is all a lot of work, and you're "swimming upstream" from
Access. Are you sure it's worth it? We've built hundreds of
applications without needing this more than a few times.

Armen Stein
Microsoft Access MVP
www.JStreetTech.com
 

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