Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Date compares

Status
Not open for further replies.

Ham

Technical User
Feb 23, 2000
122
US
I'm using VBA in Access.&nbsp;&nbsp;I have a table with the date format set to &quot;mmm-yy&quot;.&nbsp;&nbsp;In VBA I also have the date format set to &quot;mmm-yy&quot;.&nbsp;&nbsp;In doing a seek on the table, I'm getting a hit on &quot;Jan-00&quot; even though the argument I'm using is &quot;Jan-01&quot;.&nbsp;&nbsp;It acts like the system is reading Jan-01 as January 1st, even though the format is mmm-yy.&nbsp;&nbsp;So, rather than adding records for 2001, I'm editing the records for 2000 - not what I had in mind.&nbsp;&nbsp;Any suggestions?<br><br>Thanks - Ham
 
&nbsp;&nbsp;&nbsp;I'm a little rusty on this access date problem, but had to deal with<br>it a couple of years ago when using vb as an access front-end.&nbsp;&nbsp;If I<br>remember right, the choice you make for the access table format<br>has no affect on queries, matching, etc.&nbsp;&nbsp;It is only for display purposes.<br>However, you can test this by running a query or two directly in<br>access.<br>&nbsp;&nbsp;&nbsp;I also have a vague recollection that the date format chosen in windows<br>has an affect on how access matches dates.&nbsp;&nbsp;Again, that can be tested<br>with an access query or two.&nbsp;&nbsp;My guess is that you'll have to use the<br>standard mm/dd/yy format in an access query and in your vba, if that<br>is your default windows format.&nbsp;&nbsp;Just a guess, though.<br><br> <p>Jim Carlson<br><a href=mailto:nx56@inetarena.com>nx56@inetarena.com</a><br><a href= > </a><br>oracle, vb, some javascript
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top