Before Updating

G

Gsurfdude

Hello,
I have a continuous Access form that contains about 50 controls. They
include a combination of text boxes and combo boxes.
The form's record source is a query from 3 Oracle linked tables and all the
controls are bound.

My question is I need to be able to edit any data in a control without
updating the underlying table(s) for a record
even if the user moves to another record. The form is set to Dynaset
(Inconsistant updates) I know the
BeforeUpdate and AfterUpdate events are fired off but I am not sure how to
be able to do this.

I do not need to do a validation. This form is to allow the user to see the
existing data but edited it then
click a command button to save the current record.

Hope this makes sense. Suggestions?
 
K

Klatuu

Why?
It only adds complexity to your form and adds an extra keystroke for the user.

It can be done by using a module level boolean varialbe to indicate whether
to allow the update.
You could use something like
Dim blnOkToUpdate As Boolean

Then in the form's Dirty event, set it to False.

In the form's Before Update event:

Cancel = Not blnOkayToUpdate

In the save command button Click event

blnOkayToUpdate = True
If Me.Dirty Then
Me.Dirty = False
End If
 

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