Query Database with 2 dropdowns

R

Rene Miller

I am trying to create a webpage that will allow users to specifiy what data
they would like to look at in a database by using two dropdown menus. I have
followed the wonderful instructions at
http://spiderwebwoman.com/tutorials/doubledropdown.htm. I can get it to work
on the demo database, but not with my data base.

The first page is grade. The users selects a grade level and the results are
suppose to go to subject page. The page displays but the dropdowns are blank.


Below are the SQL statements for each dropdown:

"SELECT DISTINCT grade FROM StateAchievementStandards WHERE
(grade='::grade::')"

"SELECT DISTINCT subject FROM StateAchievementStandards WHERE
(grade='::grade::')"

I have gone over steps many times and I can't see why it isn't working.
Hopefully somebody else can see my error.

Thanks in advance the help.
 
R

Rene Miller

Kathleen,

The data type for Grade is Text. The Database is a test database and
contains some valid data, but it also had data that needs to be cleaned up.
For example in the Grade field it contains 01, 02, 03, etc, but it also
contains K, Level1, Level2, etc. These items display correctly on my first
page, so I am assuming that is not the problem. I think it must be SQL
statement, but can't find the problem. I have left off the Where statement
and I get data in the dropdown fields, but when I add Where
(grade='::grade::') I get blanks. I did try taking the quote marks out, but
still no results.

Thanks in advance for your help.
 
K

Kathleen Anderson [MVP - FrontPage]

Hi Rene:
If you got it to work with the demo database, then I would suspect something
is going on with your database. How big is it? If it doesn't contain any
sensitive data, could you send it to me? The email address I post with is
valid.

--

~ Kathleen Anderson
Microsoft MVP - FrontPage
Spider Web Woman Designs
web: http://www.spiderwebwoman.com/resources/
 
R

Rene Miller

Kathleen,

Thanks for the kind offer of troubleshooting the problem. I did finally get
it to work late yesterday. I used the Custom Query feature of the DBRW. Then
the dropdown menus were populated with data. The SQL statements didn't have
the WHERE statement. This project was actually a test run before I get the
real database so we will see what happens when I get the real data. Hopefully
I can still get it to work then. Thanks for your wonderful website. It is a
great resource for a newbie like me. Thanks also for your willingness to help
help with my problem.

Rene Miller
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top