B
briank
Hello. I have a subform that I want to limited how data is inserted. If the
condition is not met then I would like to clear out any of the data attempted
to be inputted. Currently the user can enter data, see the msgbox and proceed
to click enter and the subform will accept the data. Not really what I want.
Any thoughts?
Column 1 (Grant2_Notes) is a comment field.
Column 2 (Grant2_Goal) is a numerical field.
The user can enter data in Column 2 only if there is text in Column1.
Private Sub Grant2_Goal_BeforeUpdate(Cancel As Integer)
If IsNull(Me.Grant2_Notes) Then
MsgBox "<message>", vbOKOnly
Me.Undo
End If
End Sub
condition is not met then I would like to clear out any of the data attempted
to be inputted. Currently the user can enter data, see the msgbox and proceed
to click enter and the subform will accept the data. Not really what I want.
Any thoughts?
Column 1 (Grant2_Notes) is a comment field.
Column 2 (Grant2_Goal) is a numerical field.
The user can enter data in Column 2 only if there is text in Column1.
Private Sub Grant2_Goal_BeforeUpdate(Cancel As Integer)
If IsNull(Me.Grant2_Notes) Then
MsgBox "<message>", vbOKOnly
Me.Undo
End If
End Sub