Slab_Rankle
Registered User.
- Local time
- Today, 16:15
- Joined
- Aug 10, 2011
- Messages
- 36
Hey guys,
I'm having problems trying to make a required field pop up a message when it's left blank. It's for a subform and I don't think the code I'm using as the destination is right. Here's what I have at the moment:
Private Sub Form_BeforeUpdate(Cancel As Integer)
If IsNull(Forms![TabForm]![Notes subform].Form.txtNarrative) Then
MsgBox "Field needs to be filled in"
Me.txtNarrative.SetFocus
End If
End Sub
Can anyone point me in the right direction?
I'm having problems trying to make a required field pop up a message when it's left blank. It's for a subform and I don't think the code I'm using as the destination is right. Here's what I have at the moment:
Private Sub Form_BeforeUpdate(Cancel As Integer)
If IsNull(Forms![TabForm]![Notes subform].Form.txtNarrative) Then
MsgBox "Field needs to be filled in"
Me.txtNarrative.SetFocus
End If
End Sub
Can anyone point me in the right direction?