OK, so you populate your "select distributor state" control from tblstate,
with the values = state_name
Then do the same query on your listing page, but add WHERE dis_state =
'#FORM.<yourStateSelectControlName>#'
You can even put a conditional in your cfquery:
select <whatever>
FROM <whatever>
etc
etc
<CFIF FORM.<yourStateSelectControlName> NEQ <whatever value you are
using for ALL states>>
WHERE dis_state = '#FORM.<yourStateSelectControlName>#'
</CFIF>
-----Original Message-----
From: Michael Wilson [mailto:[EMAIL PROTECTED]]
Sent: Thursday, November 30, 2000 10:12 AM
To: CF-Talk
Subject: Another newbie Query/DB Question
Hi,
I have an Access DB with the following:
tbldis - dis_id, dis_name, dis_phone, dis_city and dis_state
tblstate - id, state_name
I have made a page that lists all distributors (over 100), Grouped/ordered
by state, then city and then distributor name. At present the page lists
'all' distributors by default. What I would like to do is to add the ability
for the user to select an individual state from a dropdown menu and pull up
the distributors for only a specific state, if they so choose.
I only use tblstate to populate a dropdown on the insert form and update
forms in the admin interface. This puts the actual state_name, rather than
an ID in tbldis during an update or insert.
As things stand, is it possible for me to accomplish what I want and if so
could you provide an example. If not what changes will I have to make to my
DB in order to make this work.
Thanks,
Mike
============================================
Michael Wilson - CTO/Secretary
http://www.xionmedia.com
--------------------------------------------
Xion Media, Inc. Web Development
P: 704-398-2454 F: 704-398-2063
============================================
"In the middle of difficulty lies opportunity." --Albert Einstein
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at
http://www.fusionauthority.com/bkinfo.cfm
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at
http://www.fusionauthority.com/bkinfo.cfm
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists