View Full Version : database driven dependent drop down box

12-29-2004, 08:01 PM
Can someone please give guidelines on how may I start with database driven dependent drop down box? Should I have to create a lookup fields in the database or just populate all the required fields? how will I retrieve the records using asp?

I have four fields -when select a value, second box should be populated based on the value chosen and so on, I would like to store all the required information in the database, then pull those data using asp.

12-30-2004, 06:27 AM
You can use this code if you would like.

12-31-2004, 12:57 AM
And perhaps this may hopefully give you some ideas. It's got a downloadable sample and does retain values after the post back:

Classic ASP Design Tips - Dependent Listboxes

12-31-2004, 03:42 PM
Thankyou freeasphelp. If possible, can you please explain the coding part? And in database, should all the data be manually entered in to the database?

12-31-2004, 03:57 PM
I have one more question regarding the database. I noticed that CountryID field in Countries table is Autonumber and under properties - Fieldsize = Long integer , New Values = Increment. In State table, countryId as Foreign key, you have given CountryId as Number and under properties - FieldSize = Long Integer, Decimal Places = Auto and default value = 0.

My question is:
1.Will Access allow to set different datatype for the relationship fields because I have tried doing it but when it comes to setting the relationship, it always gave an error.

02-22-2005, 06:17 PM
I would like to use this code (aspchain.zip from above) for the dynamic list but I'm not sure how to insert data into a table that has relationships, like if I want to insert the model, make, year and options of a car how would I do that, I know how when just using one table just not two?

Thanks for any help you may have.

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum