Updating data

  • Thread starter Thread starter PK.10987
  • Start date Start date
P

PK.10987

I have a data entry form that is bound with a table.
Now when i just type in a value in the form and close it the value gets
saved in the table.
I want to avoid that or disable it and prompt the user to save it in the
corresponding table.
 
Use the BeforeUpdate event procedure of the *form* to get a confirmation
before saving changes.

This example shows how to use the event to undo the changes if the user
answers No to the "Save?" dialog:

Private Sub Form_BeforeUpdate(Cancel As Integer)
If MsgBox("Save?", vbYesNo, "Confirm") = vbNo Then
Cancel = True
Me.Undo
End If
End Sub
 
I have a data entry form that is bound with a table.
Now when i just type in a value in the form and close it the value gets
saved in the table.
I want to avoid that or disable it and prompt the user to save it in the
corresponding table.

Just from a user-interface point of view, what is the POINT of a data entry
form which does NOT do data entry (unless the user jumps through another
hoop)?

In practice, if the user is required to click a "yes, I really do enter this"
every time they enter data, they'll get in the habit of mindlessly clicking
yes to everything and you'll be WORSE off.

What real-life problem are you attempting to solve? Might it be better to have
your form read-only with a command button to enable edits?
 
Back
Top