Hi,
To convert strDate into a Date within this query : (first the conversion is done in date and then for checking with firstdate and lastdate all the three dates are converted back to character in ddmmyyyy format. The format can be anything, but all should have the same format.)
SQL = "SELECT * FROM tblKundenstamm, tblVertrag " _
& "WHERE tblVertrag.strKSID = tblKundenstamm.IDRef AND
to_char(to_date(strDate,'ddmmyyyy'),'ddmmyyyy')
BETWEEN " & to_char(firstDate,'ddmmyyyy') & " AND " & to_char(lastDate,'ddmmyyyy') & " " _
& "ORDER BY tblKundenstamm.strFirma, tblVertrag.strVertragNr"
Thanks ...
Bye