thisisntwally
CE&A
- Local time
- Today, 05:33
- Joined
- Jun 27, 2007
- Messages
- 246
I've finally got a validation rule going in a public function. sadly the msgbox's spring, but the rest of the code continues to run.
setting the function as boolean...
called in code...
I had realllllllly hoped DoCmd.CancelEvent would cancel the event. Is there a better way to cancel the action?
setting the function as boolean...
Code:
amdValid = true
If Nz(vFrm.txtvalue, "") = "" Then
MsgBox "Please Include a Dollar Value for this Record"
amdValid = False
End If
called in code...
Code:
Private Sub comSave_Click()
On Error GoTo Err_comSave_Click
If amdValid(Forms![Input Form]) = False Then [COLOR="Red"]DoCmd.CancelEvent[/COLOR]
I had realllllllly hoped DoCmd.CancelEvent would cancel the event. Is there a better way to cancel the action?