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

Sql Sekect to Access

Status
Not open for further replies.

cr84net2

Programmer
Feb 8, 2005
93
US
I need to convert this SQL Select statement in to a select statement that will work with MS Access 2000. Any help would be appreciated.

Code:
strSQL = "SELECT * FROM eventCalendar WHERE " & _
"convert(datetime,convert(varchar,DatePart(yyyy, dteEventStart)) + '-' + " & _
"convert(varchar,DatePart(mm, dteEventStart)) + '-' + " & _
"convert(varchar,DatePart(dd,dteEventStart))) <= " & _ 
"'" & intYear & "-" & intMonth & "-" & y & "'" & " AND " & _ 
"convert(datetime,convert(varchar,DatePart(yyyy, dteEventEnd)) + '-' + " & _
"convert(varchar,DatePart(mm, dteEventEnd)) + '-' + " & _
"convert(varchar,DatePart(dd,dteEventEnd))) >= " & _
"'" & intYear & "-" & intMonth & "-" & y & "'" & _
"ORDER BY dteEventStart, dteEventEnd"

Thanks
 
You might do best if you post your query in a MS Access forum on this site.

-SQLBill

Posting advice: FAQ481-4875
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top