Link to home
Start Free TrialLog in
Avatar of Ted Palmer
Ted PalmerFlag for United States of America

asked on

How do I test for null condition of date datatype variables in MS-Access 2003

EE Experts,

I have the following 3 lines of code that give me an error message

     If Not (datShipDate Is Null) Then
                    !ShipDate = datShipDate
                End If

Open in new window


User generated image
How can I test for a null value on a variable that is date datatype?
ASKER CERTIFIED SOLUTION
Avatar of Anders Ebro (Microsoft MVP)
Anders Ebro (Microsoft MVP)
Flag of Denmark image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Ted Palmer

ASKER

Thank you Anders Ebro. That worked for just fine. I am embarassed to ask such a simple question. I found an answer in my wife's Alison Balter book that looked good, but yours was more complete and specific to my situation. I am a bit behind on this project so getting a quick answer was most helpful to me. Thank you.

Ted Palmer
Thank you..!!
If its any comfort, switching back and forth between T-SQL and vba, I probably by accident (or because I am forgetfull) use the T-SQL syntax at least once a month, and then scratch my head until I remember my mistake.