still having probs with select statement where date = todays date
Hi Guys
I am using vb6.0 connecting to a SQL database (runningMSDE)
I am trying to load all contacts where the recontactdate is today
I have tried the following but am getting the error - syntax error converting datetime to character string - please help!
my code -
onload - dtpicker1.value = date
(tblcontacts.dtmrecontactdate is date/time)
Set adoduecallbacks = New Recordset
adoduecallbacks.Open "Select * from tblcontacts where dtmrecontactdate = ' " & DTPicker1.Value & "%" & " ' ", db, adOpenStatic, adLockOptimistic
- Please help!!!
Thanks
still having probs with select statement where date = todays date(Resolved)
Hi There
The column is being filled when a user selects a date using the dtpicker on the contacts form.
Thanks for the input guys - the issue is resolved by using the following -
adoduecallbacks.Open "Select * from tblcontacts where dtmrecontactdate = '" & Format$(Date, "yyyymmdd") & "'", db, adOpenStatic, adLockOptimistic
:wave: