Again, something simple tripping me up, or maybe I'm just brain dead.
I have a text box on a form to filter the underlying query for a report when that report is selected to be run. I want to display a message if the field is blank. I've done this with combo boxes, etc. but with this I keep getting "type mismatch" when I try to test with the field blank.
Here's the code:
---------------------------
Case 9
Me.txtLastDate.SetFocus
If Me.txtLastDate.Text = "" Then
MsgBox "Please enter a date", "Slow Moving Inventory,vbOKOnly"
Exit Sub
Else
stDocName = "Slow Moving Inventory"
End If
----------------------------
I have a text box on a form to filter the underlying query for a report when that report is selected to be run. I want to display a message if the field is blank. I've done this with combo boxes, etc. but with this I keep getting "type mismatch" when I try to test with the field blank.
Here's the code:
---------------------------
Case 9
Me.txtLastDate.SetFocus
If Me.txtLastDate.Text = "" Then
MsgBox "Please enter a date", "Slow Moving Inventory,vbOKOnly"
Exit Sub
Else
stDocName = "Slow Moving Inventory"
End If
----------------------------