Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Selecting a country from an Access database 1

Status
Not open for further replies.

DrDan1

Technical User
Oct 2, 2002
127
GB
Hi there. A Coldfusion Question.

I want to offer a user visiting my page to a choice of a country from a complete lis of countries in the form of a drop down box. I was wondering if I could keep a list of all the countries in an Access table. The drop down box would then get it's data from that table. A user would then make his selection from the box on the form.

This would make it much easier to update the list of countries so when I add a new country to the Database it will automatically update the website.

Any help appreciated. Thanks
--Dan

----------------------------------------
Knowing is not enough, we must apply. Willing is not enough, we must do.
--So said the ever wise Bruce Lee
Memorize and live by it!
 
Thanks mate. You're a star.

----------------------------------------
Knowing is not enough, we must apply. Willing is not enough, we must do.
--So said the ever wise Bruce Lee
Memorize and live by it!
 
Also, if you're using CFform, this is what cfselect was designed to do. Just specify the query name in the cfselect tag and it will do the rest (without any "option" tags.)

Hope this helps

Eric
 
Oh, yeah....I forgot... CFselect will also allow you to specify a default value out of all of the values returned from the query. So, if you have a list of Countries in alphabetical order and you didn't want the user to have to scroll to the bottom of the list for "United States", you could specify it as your default and it would be the selected country in your list.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top