L
ladybug via AccessMonster.com
I have this code in a Before Update on a form:
If Not IsNull(Me.[Client]) And (IsNull(Me.[hours]) Or Me.[hours] = 0) Then
MsgBox "Field hours must be updated"
Cancel = True ' will stop the process
End If
I now need another field required if the Client field is selected. It is not
a number field.
I figured something like this:
If Not IsNull(Me.[Client]) And (IsNull(Me.[origin]) Or Me.[origin] = Null)
Then
MsgBox "Origin must be selected"
Cancel = True ' will stop the proces
End If
How do I combine both of these codes? I keep receiving an error.
If Not IsNull(Me.[Client]) And (IsNull(Me.[hours]) Or Me.[hours] = 0) Then
MsgBox "Field hours must be updated"
Cancel = True ' will stop the process
End If
I now need another field required if the Client field is selected. It is not
a number field.
I figured something like this:
If Not IsNull(Me.[Client]) And (IsNull(Me.[origin]) Or Me.[origin] = Null)
Then
MsgBox "Origin must be selected"
Cancel = True ' will stop the proces
End If
How do I combine both of these codes? I keep receiving an error.