I have an ACCESS 2000 db, where I have 4000 recordsets with 13 fields, one field is the date entered, which DATA TYPE is set to Date/Time. In Access I can sort by this Date field, and use the BETWEEN parameters fine.<br>
<br>
When I use VB6 code and load a form in the MSGrid from this database, the Date field is loaded into the grid as a string or number(definitely not a date). I know this because in my VB6 code the SQL LIKE will select it. Also when I input a date to a variable , i.e 01/12/00, it get the message back 'divison by 0'. <br>
<br>
I have tried '',"",(),[] around the variable, and set the variable to PUBLIC, and still don't work. The documentation is really scarce on this quirk. I have run out of ideas.. <br>
<br>
my SQL code is elementary:<br>
<br>
PUBLIC VarStartDate as Date<br>
PUBLIC VarEndDate as Date<br>
<br>
SELECT * FROM tblKillSheet BETWEEN varStartDate AND varEndDate <p>Dewey Davis<br><a href=mailto:ddavis@dfn.com>ddavis@dfn.com</a><br><a href= > </a><br>
<br>
When I use VB6 code and load a form in the MSGrid from this database, the Date field is loaded into the grid as a string or number(definitely not a date). I know this because in my VB6 code the SQL LIKE will select it. Also when I input a date to a variable , i.e 01/12/00, it get the message back 'divison by 0'. <br>
<br>
I have tried '',"",(),[] around the variable, and set the variable to PUBLIC, and still don't work. The documentation is really scarce on this quirk. I have run out of ideas.. <br>
<br>
my SQL code is elementary:<br>
<br>
PUBLIC VarStartDate as Date<br>
PUBLIC VarEndDate as Date<br>
<br>
SELECT * FROM tblKillSheet BETWEEN varStartDate AND varEndDate <p>Dewey Davis<br><a href=mailto:ddavis@dfn.com>ddavis@dfn.com</a><br><a href= > </a><br>