-
May 18th, 2005, 11:34 AM
#1
Time Parameter - Please help!
Hello gurus,
I am really confused on how to write this sql command. I am using an access database and I have a date field that is of ShortDate format. I have a time field that is short time format.
I am using sql commands to get my data. I have four parameters defined, BeginDate, EndDate, BeginTime, EndTime. My where clause looks like this:
HTML Code:
Where (Master.Date Between {?BeginDate} And {?EndDate}) And
(Master.Time Between {?BeginTime} And {?EndTime})
I have never had a problem in the past using this syntax for a date. But for some reason, I am having a problem when I do this with my time field.
The error I am getting says that it failed to open a rowset and that I am missing an operator and the where clause looks like this:
(Master.Date Between #1/26/2005# And #1/26/2005#) And
(Master.Time Between d '12:10:00'} And d '12:10:05'})
I'm not sure why a d got inserted and where did my left bracket ({) go? Please help me!
Thanks,
Steph
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
|