Prevent updating Record when user click on a subform

L

Le, Thanh-Nhan

Hi,
I have a bound form, on this form I have subforms with diference buttons (I
use these button subforms for other data forms, too).
A button subform had only OK und Cancel Button. I want, when user click
"OK", then the current record will be updated, and "Cancel", then the
changes will be undone.

But just when the main form loses focus (button subform receives focus),
access updates immediately the current record.

How can I prevent this behavior of access?
Is it possible? It is very comfortable to use a button subform for diff.
forms (as toolbar).

Thanks
Nhan
 
R

Rick Brandt

Le said:
Hi,
I have a bound form, on this form I have subforms with diference buttons (I
use these button subforms for other data forms, too).
A button subform had only OK und Cancel Button. I want, when user click
"OK", then the current record will be updated, and "Cancel", then the
changes will be undone.

But just when the main form loses focus (button subform receives focus),
access updates immediately the current record.

How can I prevent this behavior of access?
Is it possible? It is very comfortable to use a button subform for diff.
forms (as toolbar).

You can't. Put the buttons on the main form and they will work *for
changes to the main form*. There is no easy way to apply a "save at the
end of all my editing" method to a form that has subforms. The only way I
know of is to bind the forms to work tables where you temporarily populate
them with the data from the source tables, make all your changes and
insertions, and then apply those changes to the source tables with append
and update queries.

More trouble than it's worth IMO. Tell the users not to screw around with
the record if they have no intention of changing it.
 
L

Le, Thanh-Nhan

Thanks,
a question
can a usercontrol, that is created with VB6, be used on a access form?

Nhan
 

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