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 Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

SQL IN VB - Using the Between clause 1

Status
Not open for further replies.

aviles22

Programmer
Jun 27, 2000
25
US
I want to search the DB for records that fall between two dates using two variables in my SQL Statement.

Dim Date1 as Date
Dim Date2 as Date

("Select * from ActiveJobs where JobDate between (*****
**this is where I need help using the variables above)


[sig][/sig]
 
Try something like this
Dim Date1 as Date
Dim Date2 as Date

"Select * from ActiveJobs where JobDate between #" & date1 & "# and #" & date2 & "#"


[sig]<p>David Paulson<br><a href=mailto: > </a><br><a href= > </a><br> [/sig]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top