Problem with corrupt data entry

R

r.peachey

Hi everyone,

I have a simple form that inserts info into one table. If I type
anything into the textboxes in the form, it automatically enters into
the table, even if I dont press save and just move to another record or
switch to design mode. Is there a way to make the form only save data
to the table when instructed to do so? I'm just thinking that I am
going to have alot of corrupt records in my table because users are not
aware that it is saving.

Thanks so much for your help,

RP
 
B

Brian Bastl

RP,

that's the default action of bound forms. You could use the form's Before
Update event procedure to pop up a message box asking the user whether they
want to save the current record.

Private Sub Form_BeforeUpdate(Cancel As Integer)
If MsgBox ("Save Record?", vbYesNo) = vbNo Then
Cancel = True
Me.Undo
End If
End Sub
 
Top