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

Code Help

Status
Not open for further replies.

tekyge

Programmer
Dec 11, 2005
125
US
The below code works but it shows all the records or none, and I would like it to show only the records after the current date. Any help?

sql = "SELECT * FROM [Projects] WHERE [Projects].[ActID]=" &Trim(session("myvar1"))& " AND [Projects].[CDate]>Date()" & " ORDER BY [Projects].[ProjectName] ASC
 
You may try this:
sql = "SELECT * FROM Projects WHERE ActID=" & Trim(Session("myvar1")) & " AND Int(CDate)>Int(Date()) ORDER BY ProjectName"

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top