Kool...thanks....I actually need data not to save if a certain field does not
meet a certain criteria when the form is closded....I will lok into that...
Kool...thanks....I actually need data not to save if a certain field does not
meet a certain criteria when the form is closded....I will lok into that...
Use the Form's "Before Update" event to check the validity of the data. If
it's invalid, set the Cancel operand to True. The code might look like
Private Sub Form_BeforeUpdate(Cancel as Integer)
If Me!certainfield > 100 Then
MsgBox "certainfield must be <= 100!", vbOKOnly
Cancel = True
End If
End Sub
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.