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


Run Time Error Message from VBA in MS-Access-2003
How can I test for a null value on a variable that is date datatype?
Ted PalmerInformation Technology ConsultantAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Anders Ebro (Microsoft MVP)Microsoft DeveloperCommented:
in vba the syntax is:
If Not (isNull(datShipDate)) Then
                    !ShipDate = datShipDate
                End If

Open in new window

0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Ted PalmerInformation Technology ConsultantAuthor Commented:
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
0
Ted PalmerInformation Technology ConsultantAuthor Commented:
Thank you..!!
0
Anders Ebro (Microsoft MVP)Microsoft DeveloperCommented:
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.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Access

From novice to tech pro — start learning today.