IF & AND statement not working *SOLVED*
I'm trying to get a IF & AND statement working together but cannot get it to work when a field is null only. It works when testing has certain data in it, but I want it to work when the date field is empty (null)
Working Code if 10/10/2010 is entered
But when I change the above section to Me.Deposit_Payment_Date_Limit, IsNull
It doesn't work or compile correctly, where am I going wrong????
Ian
MsgBox ("deposit error")
Response = acDataErrContinue
I'm trying to get a IF & AND statement working together but cannot get it to work when a field is null only. It works when testing has certain data in it, but I want it to work when the date field is empty (null)
Working Code if 10/10/2010 is entered
Code:
If Me.Breakage_Deposit > 0 And Nz(Me.Deposit_Payment_Date_Limit, "10/10/2010") Then
MsgBox ("deposit error")
Response = acDataErrContinue
But when I change the above section to Me.Deposit_Payment_Date_Limit, IsNull
It doesn't work or compile correctly, where am I going wrong????
Ian
OK I got it working by doing this:
If Me.Breakage_Deposit > 0 And IsNull(Me.Deposit_Payment_Date_Limit) ThenMsgBox ("deposit error")
Response = acDataErrContinue
Last edited: