Drop-down from a drop-down

Results 1 to 3 of 3

Thread: Drop-down from a drop-down

  1. #1
    Join Date
    Dec 1969

    Default Drop-down from a drop-down

    Hello. I have been racking my brain and cannot figure out how to do this. I have an Access database containing lists of vendors and the billing number associated with the vendor for credit information. I would like to be able to create a drop-down box that allows me to choose the vendor. Then, based on the vendor chosen, I would like a second drop down to give me the billing numbers based on that vendor. So, if I choose vendor 1, when I get to the second drop-down for billing number, I should only see any of vendor 1's billing numbers---not vendor 2. Does that make sense?? How can I do this??

  2. #2
    Join Date
    Dec 1969

    Default Couple of ways...

    ok bad thing about these methods is they require javascript... So be sure to inform any clients that dont have js enabled to enable it.<BR><BR>Remote scripting... or<BR>Hidden frame technique....<BR><BR>With the remote scripting method you can write an asp script and then use java/javascript to call the server and return a recordset object in a javascript array to browser. Then you use javascript to erase your billing pulldown and repopulate it. However remote scripting the last time I checked had a problem with macintosh ie browsers.<BR><BR>msdn.microsoft.com/scripting - check out remote scripting and read up on it. Its not that hard to use...<BR><BR>The other is the hidden frame method... You create a framed page and have it 100% so the other page appears to be hidden. Then when the user clicks the box have it load an asp script below that generates dynamic javascript to populate the billing pulldown......

  3. #3
    Join Date
    Dec 1969

    Default RE: Drop-down from a drop-down

    If you want a client side fix, one can be found at www.4guysfromrolla.com. It uses Java. Search for "Dependent List Box" or something of that nature.<BR><BR>I wanted a server side fix, so what I did was select DISTINCT column1, and the select box had a onChange="submit() on it. As soon as column 1 was selected, the page sent the info to itself (the user sees the page reload, and then have your 2nd list box that selects DISTINCT column2 from table1 where column1 = "choosen column") I use Select Case to allow the page to submit to itself.<BR><BR>Make sense? I didn&#039;t want to use the Java version because my list boxes are pulling from a table that has 9000 some records in it. But if you had a smaller selection, the java one woudl work out GREAT! (At least I think it would)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts