Forums

This topic is locked

Search page code

Posted 09 May 2004 10:29:32
1
has voted
09 May 2004 10:29:32 Mary Stephenson posted:
Just a beginner, but would like help on advanced search.

Would like to do search on three fields [Access database]. Field 1 = Regions, Field 2 = County and Field 3 = Type. I would like to give the user the option to choose from either Regions or County [but not both] and then choose from Type. Each to be dynamic drop down.

Please, can anyone help me with the code needed in the recordset advanced bit.

Edited by - MollyOne on 09 May 2004 12:06:16

Edited by - MollyOne on 09 May 2004 16:57:01

Replies

Replied 11 May 2004 11:36:42
11 May 2004 11:36:42 Vince Baker replied:
Hiya Molly.

What you need to do is create your search page with your dropdown dynamic menus but make sure you pass through the name of the field and not the id, this way, you can create a default value for them as % if the menu is not selected. This will ensure that all your results will be returned if not filtered by a specfic value. If you send ids through it will not work.

Then, on your results page you need to make joins on your main table (if your main results table holds the ids of your linked tables) to show the same values as you are sending across.

Then, filter the values on the querystring info sent through.

If that is not clear then post back here with your existing results recordset and I will post some example code for you.

Regards
Vince

Visit my home: www.chez-vince.com

VBScript | ASP | HTML | SQL | Oracle | Hosting

Reply to this topic