Hello,
I know this is a very basic question, so please bear with me.
I've built a search function. There are three parameters. I would like the user to search any one or a combination of these parameters.
The parameters filter the recordset and I do not know how to structure the filters to allow a default set through, depending on the parameter option the user selects.
I know I may need to use "OR" in addition to "AND" to get the result I need.
Here is my SQL:
SELECT Properties.PropertyID, Properties.Name, Properties.TownOrResort, Locations.TownOrResort, Properties.Ranking, Ranking.Ranking, Properties.Photo1, Amenities.Type, Amenities.Bedrooms, Amenities.Sleeps, Properties.DateRange1, Properties.DateRange2, Properties.DateRange3, Properties.DateRange4, Properties.DateRange5, Properties.DateRange6, Properties.PriceRange1, Properties.PriceRange2, Properties.PriceRange3, Properties.PriceRange4, Properties.PriceRange5, Properties.PriceRange6
FROM Properties, Amenities, Locations, Ranking
WHERE ((((Properties.PropertyID = Amenities.PropertyID) AND (Properties.TownOrResort = Locations.LocationID)) AND (Ranking.RankingID = Properties.Ranking)) AND ((Properties.TownOrResort = MMColParam) AND (Amenities.Type = 'MMColParam2')))
ORDER BY 4 ASC, 2 ASC, 6 ASC, 9 ASC
Thanks for any help you can lend.