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

Select string question.... 1

Status
Not open for further replies.

savok

Technical User
Jan 11, 2001
303
AT
I am trying to select all the records from the db where startdate is greater than the one in the txt box but for some reason it gives me all the dates? heres the code...


DBComm.ActiveConnection = DBConn
DBComm.CommandText = "Select * from Schedule where ScheduleID = " & strID & " and StartDate > " & txtStartDate & " "
DBComm.CommandType = adCmdText


thanks...
 
First off, are you date fields stored as dates or text?

If they are stored as dates, use this instead of what you have.

"Select * from Schedule where ScheduleID = " & strID & " and StartDate >#" & txtStartDate & "#"
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top