I have an event search site and have a simple form (search from date 1 to date 2 with an optional keyword text field) and I thought it was working, but have discovered that in some cases it just returns ALL the events from the database.
Here is the MM DW8 select statement I am using... am I doing something wrong with either my quotes or the # symbols? Im lost as to what the problem is.
Here is the MM DW8 select statement I am using... am I doing something wrong with either my quotes or the # symbols? Im lost as to what the problem is.
Code:
RS_Events.Source = "SELECT * FROM tbl_events WHERE eventdate BETWEEN #" + Replace(RS_Events__MMColParam2, "'", "''") + "# AND #" + Replace(RS_Events__MMColParam3, "'", "''") + "# And eventtitle like '%" + Replace(RS_Events__MMColParam4, "'", "''") + "%' or eventdetail like '%" + Replace(RS_Events__MMColParam4, "'", "''") + "%'"