I am trying to get the value of a calendar control into a variable and use this in the following DCount command but I keep getting a count of 0.
setdate1 = CalCtrl.Value
CaseCount = DCount("[Date]", "Case", "[Date] = # " & setdate1 & " #"
I know the DCount command works because if I change the first line to: setdate = #3/2/2004# I get the right answer. I figure I must have to convert the CalCtrl.value somehow. Can anyone help?
setdate1 = CalCtrl.Value
CaseCount = DCount("[Date]", "Case", "[Date] = # " & setdate1 & " #"
I know the DCount command works because if I change the first line to: setdate = #3/2/2004# I get the right answer. I figure I must have to convert the CalCtrl.value somehow. Can anyone help?