Hi i am using following sql statement to filter records of an access db but it doesn't display any records or gives an error when i try it with a variable.
With a normal date everything is working fine.
i tried also to use the format string around the variable and to convert the string to a date field with (dte = cdate(sdatum)) but also this won't work for me.
This is the SQL statement that i use.
anyone an idea what i am doing wrong here.
thanks a lot
With a normal date everything is working fine.
Code:
"AND tblmeeting.Meetingdatum>#" & #8/03/2006# & "#"
i tried also to use the format string around the variable and to convert the string to a date field with (dte = cdate(sdatum)) but also this won't work for me.
This is the SQL statement that i use.
Code:
dim sdatum as string
sdatum = date.Now.ToShortDateString
drpsSQL = "SELECT tblmeeting.MeetingID, tblmeeting.Meetingdatum, tblmeetingaanwezigensub.PersID, tblmeetingaanwezigensub.Meetingaanwezigid"
drpsSQL = drpsSQL & " " & "FROM tblmeeting INNER JOIN tblmeetingaanwezigensub ON tblmeeting.MeetingID = tblmeetingaanwezigensub.Meetingnr"
drpsSQL = drpsSQL & " " & "WHERE tblmeetingaanwezigensub.PersID =" & stringelogdID & "AND tblmeeting.Meetingdatum>#" & sdatum & "# "
anyone an idea what i am doing wrong here.
thanks a lot