cath_hopes
Registered User.
- Local time
- Today, 14:41
- Joined
- Oct 17, 2007
- Messages
- 52
Hi there - I seem to have a data type mismatch or something - the following simple If...End If statement is not working:
...
'Check House Name/ Number and Postcode are populated:
If Me.House_Name__Number.Value = Null Or Me.Postcode.Value = Null Then
MsgBox "Both House Name/ Number and Postcode must be correctly populated."
Else
DoCmd.Close acForm, "PropertyForm", acSavePrompt
End If
...
I have blanked both the Postcode and the House Name/ Number yet the Msgbox does not get invoked in my form. I've tried changing Null to " " but that doesn't work either.
Both Postcode and House Name/ Number are text fields from a table and editable fields on my form.
Hopefully this is a quick one to fix!
Thanks!
...
'Check House Name/ Number and Postcode are populated:
If Me.House_Name__Number.Value = Null Or Me.Postcode.Value = Null Then
MsgBox "Both House Name/ Number and Postcode must be correctly populated."
Else
DoCmd.Close acForm, "PropertyForm", acSavePrompt
End If
...
I have blanked both the Postcode and the House Name/ Number yet the Msgbox does not get invoked in my form. I've tried changing Null to " " but that doesn't work either.
Both Postcode and House Name/ Number are text fields from a table and editable fields on my form.
Hopefully this is a quick one to fix!
Thanks!