Illufox
03-24-2005, 12:08 PM
I have a calendar page which displays only current dates, no past dates and contains a search field where people can search for any field in the database. Wile the calendar doesn't display any past dates, the search result page does. I need to get rid of this but when I use the same code piece ("Date_S >= Date()") I used for the calendar page it doesn't work. Here is what I have:
Recordset1.Source = "SELECT IdMeeting, Date_S, EventName, Location, ProjectLead, Status, TypeOfMeeting, MarketingLead, Industry, ADDStaff FROM Meeting
WHERE Industry LIKE '%" + Replace(Recordset1__MMColParam, "'", "''") + "%'
OR EventName LIKE '%" + Replace(Recordset1__MMColParam, "'", "''") + "%'
OR Location LIKE '%" + Replace(Recordset1__MMColParam, "'", "''") + "%'
OR ProjectLead LIKE '%" + Replace(Recordset1__MMColParam, "'", "''") + "%'
OR Status LIKE '%" + Replace(Recordset1__MMColParam, "'", "''") + "%'
OR TypeOfMeeting LIKE '%" + Replace(Recordset1__MMColParam, "'", "''") + "%'
OR MarketingLead LIKE '%" + Replace(Recordset1__MMColParam, "'", "''") + "%'
OR TypeOfMeeting LIKE '%" + Replace(Recordset1__MMColParam, "'", "''") + "%'
OR ADDStaff LIKE '%" + Replace(Recordset1__MMColParam, "'", "''") + "%'
AND Date_S >= Date()
ORDER BY Date_S ASC"
The page seems to completely ignore this piece of code (bold) although it works just fine in the calendar page. What am I doing wrong?
Recordset1.Source = "SELECT IdMeeting, Date_S, EventName, Location, ProjectLead, Status, TypeOfMeeting, MarketingLead, Industry, ADDStaff FROM Meeting
WHERE Industry LIKE '%" + Replace(Recordset1__MMColParam, "'", "''") + "%'
OR EventName LIKE '%" + Replace(Recordset1__MMColParam, "'", "''") + "%'
OR Location LIKE '%" + Replace(Recordset1__MMColParam, "'", "''") + "%'
OR ProjectLead LIKE '%" + Replace(Recordset1__MMColParam, "'", "''") + "%'
OR Status LIKE '%" + Replace(Recordset1__MMColParam, "'", "''") + "%'
OR TypeOfMeeting LIKE '%" + Replace(Recordset1__MMColParam, "'", "''") + "%'
OR MarketingLead LIKE '%" + Replace(Recordset1__MMColParam, "'", "''") + "%'
OR TypeOfMeeting LIKE '%" + Replace(Recordset1__MMColParam, "'", "''") + "%'
OR ADDStaff LIKE '%" + Replace(Recordset1__MMColParam, "'", "''") + "%'
AND Date_S >= Date()
ORDER BY Date_S ASC"
The page seems to completely ignore this piece of code (bold) although it works just fine in the calendar page. What am I doing wrong?