|
-
Oct 14th, 2012, 10:12 AM
#1
Thread Starter
Hyperactive Member
[RESOLVED] VB6 & Access 2000 Date compared to date issue
i cant get this simple query to work
Code:
rs.Open "Select * From BoardSlides WHERE SlideDisplayOnlyDate = '" & Format(Date, "mm/dd/yyyy") & "' ORDER By SlideName", connLoadLabel, adOpenForwardOnly, adLockReadOnly
SlideDisplayOnlyDate field is a datetime field, but i get a data type mismatch in criteria expression error. SlideDisplayOnlyDate holds a date and when the app is ran and that date happens to be todays date then i want to return those records. what am i doing wrong? thanks in advance
-
Oct 14th, 2012, 10:30 AM
#2
Re: VB6 & Access 2000 Date compared to date issue
With "Access" databases the ' delimiter is only for text values, use # for date values.
-
Oct 14th, 2012, 11:08 AM
#3
Thread Starter
Hyperactive Member
Re: VB6 & Access 2000 Date compared to date issue
thanks again SI. that did it.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|