ms-accessvba

Init Date variable with null value


Simple question: how can init a Date value with a null value in VBA?

Dim DateStart As Date
DateStart = Null

doesn't work.

EDIT:

I was just wondering if it's possible. In the beginning of my code I want to set the value to blank, halfway it will be given a value in most cases, if not, later on I'll request the value and if still blank I have to take another action to get a value


Solution

  • I do not believe you can do this, try

    If datestart = 0 Then