MatthewLane412
New Member
- Joined
- Aug 23, 2017
- Messages
- 24
I am working on a split form in ms access. I would like my form to not add a record if the Sending_Category = Contractors or Salaries & Benefits, and the Sending_FTE is blank. I have tried this as an on click event for the "Add Record" Macro, and on the form as a before update event. My "add record" button stops adding records when I have this code inserted, and it doesn't work with the criteria. Any ideas? Thanks
Code:
If Me.Sending_Category = Contractors Then
If IsNull (Me.Sending_FTE) Then
MsgBox "You mut enter a sending FTE before this record can be saved"
Cancel = True
Me.Sending_FTE.SetFocus
End If
Else
'Do Nothing
EndIf