General information
Category:
Database DAO/RDO/ODBC/ADO
>Hello
>
>The following codes works fine from VB:
>-------------------
>Dim cc As String, dd As Date
>
> cc = "12/12/1990"
> dd = DateValue(cc)
>
> MsgBox dd
>-------------------
>BUT
>when we put DateValue(cc) in SQL statement using Access we get error.
>
>Basicly we need to start with a fix date then loop and incerement that date
>and run the SQL code again with the new incremented date but it fail when
>we compare tablename.field = DateValue(cc).
>
>How to work around this problem???
>
>Thanks
>Mo
Can you post the SQL statement?. It sounds like you are including the function in the text instead of the value. Or, you need to enclose the date value within ##.
Previous
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only