P
pdunn
Hello, I am a major minor problem.
I am getting the date from the calendar control to pass through to SQL to
return certain rows.
The SQL function works with me typing in
strSQL = "Select * from Table Where sDate = ""09/10/2008"""
However using,
Dim dtDate as Date
dtDate = Me.Calender0.value
strSQL = "Select * from Table Where sDate = ""
strSQL = strSQL & CStr(dtDate) & """
nor excluding CStr() works
when testing
if CStr(dtDate) = "09/10/2008" then msgbox(something) end if
the msgbox does not appear
on a side note, using strCompare seems to state they are equal.
any help with being able to get a value from a Calendar control and place it
into a sql statement to access a database would be helpful. Also,
parameterized query MIGHT be helpful, but I am just exploring any options.
Thank you,
PDunn
I am getting the date from the calendar control to pass through to SQL to
return certain rows.
The SQL function works with me typing in
strSQL = "Select * from Table Where sDate = ""09/10/2008"""
However using,
Dim dtDate as Date
dtDate = Me.Calender0.value
strSQL = "Select * from Table Where sDate = ""
strSQL = strSQL & CStr(dtDate) & """
nor excluding CStr() works
when testing
if CStr(dtDate) = "09/10/2008" then msgbox(something) end if
the msgbox does not appear
on a side note, using strCompare seems to state they are equal.
any help with being able to get a value from a Calendar control and place it
into a sql statement to access a database would be helpful. Also,
parameterized query MIGHT be helpful, but I am just exploring any options.
Thank you,
PDunn