If the function is part of your SQL string then it must be part of the sql string. Here you have placed it outside your quotes so VB is looking for a function named convert within your program rather than passing it on as part of the query.
Code:
rst.open "Select * from mytable where docdate= convert(datetime, " & vDate &", 102)"
Bookmarks