Drop down filter query not working????

R

Robert Little

I at one time had a web page where I could go in and from a drop down box
choose from a list of our basketball games to see the stats for that
particular game.

Some how the code got changed. I'm almost positive that it has to do with
the code. I have tried the Northwind example of "How to filter a database
query by using a drop-down list." and it will not work either.

I have to change this line:

fp_sQry="SELECT * FROM individual_games WHERE (Opponent = '::Opponent::')"

to:

fp_sQry="SELECT * FROM individual_games WHERE Opponent = [Opponent]"

when I do this it showes all the records instead of just the one I selected.

Any Ideas? Like I siaid I had it all working at one time.

Thanks,
Rlittle
 
K

Kathleen Anderson [MVP - FrontPage]

Inline.

--

~ Kathleen Anderson
Microsoft MVP - FrontPage
Spider Web Woman Designs
web: http://www.spiderwebwoman.com/resources/
blog: http://msmvps.com/spiderwebwoman/category/321.aspx


Robert Little said:
I at one time had a web page where I could go in and from a drop down
box choose from a list of our basketball games to see the stats for
that particular game.

Some how the code got changed.

By whom?

I'm almost positive that it has to do
with the code. I have tried the Northwind example of "How to filter a
database query by using a drop-down list." and it will not work
either.

What does "not work" mean?

I have to change this line:

fp_sQry="SELECT * FROM individual_games WHERE (Opponent =
'::Opponent::')"

This is the correct syntax - you shouldn't need to change it.

to:

fp_sQry="SELECT * FROM individual_games WHERE Opponent = [Opponent]"

when I do this it showes all the records instead of just the one I
selected.

Any Ideas? Like I siaid I had it all working at one time.
Is this on your live site? Have you checked with your web host to make sure
they haven't changed anything?
 
R

Robert Little

I would assume by me somehow...

What I mean by it not working is the it dipslays all the records not just
the game I want from the Drop Down Box.

It is on our site...and nothing has been changed.

fp_sQry="SELECT * FROM individual_games WHERE (Opponent ='::Opponent::')"

I know everyone says that this is the correct syntax, but I can only get it
to work with the [brackets]

Thanks for any help,
Rlittle

Kathleen Anderson said:
Inline.

--

~ Kathleen Anderson
Microsoft MVP - FrontPage
Spider Web Woman Designs
web: http://www.spiderwebwoman.com/resources/
blog: http://msmvps.com/spiderwebwoman/category/321.aspx


Robert Little said:
I at one time had a web page where I could go in and from a drop down
box choose from a list of our basketball games to see the stats for
that particular game.

Some how the code got changed.

By whom?

I'm almost positive that it has to do
with the code. I have tried the Northwind example of "How to filter a
database query by using a drop-down list." and it will not work
either.

What does "not work" mean?

I have to change this line:

fp_sQry="SELECT * FROM individual_games WHERE (Opponent =
'::Opponent::')"

This is the correct syntax - you shouldn't need to change it.

to:

fp_sQry="SELECT * FROM individual_games WHERE Opponent = [Opponent]"

when I do this it showes all the records instead of just the one I
selected.

Any Ideas? Like I siaid I had it all working at one time.
Is this on your live site? Have you checked with your web host to make
sure
they haven't changed anything?
 
S

Stefan B Rusynko

How is Opponent value defined in the dropdown box?
See http://support.microsoft.com/kb/235554
--




|I would assume by me somehow...
|
| What I mean by it not working is the it dipslays all the records not just
| the game I want from the Drop Down Box.
|
| It is on our site...and nothing has been changed.
|
| fp_sQry="SELECT * FROM individual_games WHERE (Opponent ='::Opponent::')"
|
| I know everyone says that this is the correct syntax, but I can only get it
| to work with the [brackets]
|
| Thanks for any help,
| Rlittle
|
| message | > Inline.
| >
| > --
| >
| > ~ Kathleen Anderson
| > Microsoft MVP - FrontPage
| > Spider Web Woman Designs
| > web: http://www.spiderwebwoman.com/resources/
| > blog: http://msmvps.com/spiderwebwoman/category/321.aspx
| >
| >
| >> I at one time had a web page where I could go in and from a drop down
| >> box choose from a list of our basketball games to see the stats for
| >> that particular game.
| >>
| >> Some how the code got changed.
| >
| > By whom?
| >
| > I'm almost positive that it has to do
| >> with the code. I have tried the Northwind example of "How to filter a
| >> database query by using a drop-down list." and it will not work
| >> either.
| >
| > What does "not work" mean?
| >
| >
| >>
| >> I have to change this line:
| >>
| >> fp_sQry="SELECT * FROM individual_games WHERE (Opponent =
| >> '::Opponent::')"
| >
| > This is the correct syntax - you shouldn't need to change it.
| >
| >
| >>
| >> to:
| >>
| >> fp_sQry="SELECT * FROM individual_games WHERE Opponent = [Opponent]"
| >>
| >> when I do this it showes all the records instead of just the one I
| >> selected.
| >>
| >> Any Ideas? Like I siaid I had it all working at one time.
| >>
| > Is this on your live site? Have you checked with your web host to make
| > sure
| > they haven't changed anything?
| >
| >
|
|
 

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