ASP: Retrieving database data using drop-down menu

I am trying to retrieve data from an ACCESS database in ASP code such as

 sql="SELECT * FROM tablewithdata WHERE mydata =' & request("myformdata") & ' "

This is working if MYFORMDATA is the name element of a INPUT textbox-stand alone- on my form but it is not working if this is the name of the SELECT element of a drop-down menu with a number of options.

What am I missing??
Its a simple question but I will not be mean with the points!

Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

check the drop down menu name

it may conflict with another form element

try to check the value  
response.write (Request("dropdown_name"))

billysawAuthor Commented:

Is the "dropdown_name" the name of the FORM or the name of the SELECT?
name of the SELECT box
A select list contains options which each have their own value... make sure that the option you select has a value or Request("dropdown_name") will have a null value (or maybe an empty string?)... like this:

<select name="dropdown_name">
  <option>Select Color</option>             <-- returns ""
  <option value="FF0000">Red</option> <-- returns "FF0000"
  <option value="00FF00">Green</option> <-- returns "00FF00"
  <option value="0000FF">Blue</option>  <-- returns "0000FF"

so, if the option you selected has no value the sql statement looks like this:
SELECT * FROM tablewithdata WHERE mydata = ''
which is probably not what you want...

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Web Languages and Standards

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.