By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,299 Members | 1,247 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,299 IT Pros & Developers. It's quick & easy.

search between two dates

P: n/a
Im using access 2002 as my database, and VB 6 as my UI,
i wud like to search the data between any given date,which wud select from
datePicker vb control.
and i have a "date" field in my DB table.
My question is how the sql query will be look like.
thanx
shah

--
Message posted via http://www.accessmonster.com
Nov 13 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
Shah:
Your SQL query would look like this:
Select * from YourTable
where DateField between BeginDateControl and EndDateControl

If you're building the SQL on the fly, you'll need to have # signs
around your dates, like this:
MySQL = "Select * from YourTable where DateField between #" _
& BeginDateControl & "# and #" & EndDateControl & "#"

Nov 13 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.