S
StephanieH
I'm trying to use the following example to make a field required:
If IsNull(Me!YourRequiredControl) Then
MsgBox "Please fill in <YourRequiredControl>"
Cancel = True
Me!YourRequiredControl.SetFocus
End If
My field name is [Required by]
I've tried replacing YourRequiredControl with Required by, [Required by],
"Required by" and Required_by but none of these seem to work. How do I get
it to recognize the field name if it includes spaces?
If IsNull(Me!YourRequiredControl) Then
MsgBox "Please fill in <YourRequiredControl>"
Cancel = True
Me!YourRequiredControl.SetFocus
End If
My field name is [Required by]
I've tried replacing YourRequiredControl with Required by, [Required by],
"Required by" and Required_by but none of these seem to work. How do I get
it to recognize the field name if it includes spaces?