Forums
This topic is locked
Help needed for recordset Filtering!
Posted 06 Jan 2002 01:02:03
1
has voted
06 Jan 2002 01:02:03 Zain Magsi posted:
Hi,I have a access db for my hotwheels collection. I want to create an app where the first page has the categories of all cars. When you click on a category you should come to a page with all a list of all the years for which there are cars in that category (Ie: 'Nascar' has the years '1995,1996,1997,etc'), then on this page when you click on a date you should get a listing of all the cars for that year.
How do I get it to give me a list of dates for a single category?
Zain
Zain Magsi
Replies
Replied 06 Jan 2002 05:15:16
06 Jan 2002 05:15:16 Joel Martinez replied:
use a distinct query when you get the page... something like this:
SELECT DISTINCT year FROM cars WHERE category LIKE '"& request("catID" &"'
this will give you a list of all years within that category. When the user clicks on one of the years, the next query can look like this:
SELECT * FROM cars WHERE category LIKE '"& reqyuest("catID" &"' AND year = '"& request("year" &"'
hope that helps
Joel Martinez [ ]
----------
E-Commerce Concepts with Ultradev...pre-order yours at
www.basic-ultradev.com/ecomm_concepts/
SELECT DISTINCT year FROM cars WHERE category LIKE '"& request("catID" &"'
this will give you a list of all years within that category. When the user clicks on one of the years, the next query can look like this:
SELECT * FROM cars WHERE category LIKE '"& reqyuest("catID" &"' AND year = '"& request("year" &"'
hope that helps
Joel Martinez [ ]
----------
E-Commerce Concepts with Ultradev...pre-order yours at
www.basic-ultradev.com/ecomm_concepts/
Replied 07 Jan 2002 12:16:38
07 Jan 2002 12:16:38 Kent Steelman replied:
Your other option is to create a querry for each catagory in Access and then access that querry when you load that page...
Wm. Kent Steelman
Wm. Kent Steelman