Photo Gallery Member List Search Calendars FAQ Ticket List Log Out


drop down box with variable selected

 
Logged in as: Guest
arrSession:exec spGetSession 2,2,201
 Active Users: There are 0 members and 0 guests.
 Users viewing this topic: none
 

 

 
  
  Printable Version
All Forums >> [Scripting] >> WSH & Client Side VBScript >> drop down box with variable selected
  Do you like VisualBasicScript.com? Link to us and help spread the word about our forum. Thanks!
Page: [1]
Login
Message << Older Topic   Newer Topic >>
 drop down box with variable selected - 6/22/2001 2:23:58 PM   
  paulaham

 

Posts: 3
Score: 0
Joined: 6/22/2001
From:
Status: offline
I am trying to create a drop down box using the values in an Access database table. I can create the drop down fine, but I want the variable passed from a previous page to be selected in the drop down. Does anyone know how to do this?
 
 
Post #: 1
 
 Re: drop down box with variable selected - 7/2/2001 7:54:49 AM   
  mpordes

 

Posts: 1
Score: 0
Joined: 7/2/2001
From: USA
Status: offline
just put a while not eof.rs rs being the recordset you have gotten from access. Outside the while have the <select tags> and then in the loop do the <option> variable </option>
outside the loop have </select>
make sense ?

(in reply to paulaham)
 
 
Post #: 2
 
 Re: drop down box with variable selected - 7/3/2001 4:27:57 PM   
  paulaham

 

Posts: 3
Score: 0
Joined: 6/22/2001
From:
Status: offline
quote:

just put a while not eof.rs rs being the recordset you have gotten from access. Outside the while have the <select tags> and then in the loop do the <option> variable </option>
outside the loop have </select>
make sense ?




(in reply to paulaham)
 
 
Post #: 3
 
 Re: drop down box with variable selected - 7/3/2001 4:30:54 PM   
  paulaham

 

Posts: 3
Score: 0
Joined: 6/22/2001
From:
Status: offline
This is what I have: Can you help me?

<select NAME="PrimMktMgr"
SIZE="1" style="font-family: Tahoma; font-size: 10pt">
<% Set conn=Server.CreateObject("ADODB.Connection") %>
<% conn.Open "DSN=OppReview" ' Connect to the database %>
<% Set rs = conn.Execute("SELECT Distinct Mkt_Mgr_Name FROM TblMarketManager ORDER BY Mkt_Mgr_Name") %>
<% Do While Not rs.EOF %>
<option VALUE="<%= rs("Mkt_Mgr_Name")%>">
<%= rs("Mkt_Mgr_Name") %> <% rs.MoveNext %> <% Loop %> <% rs.Close %> <% conn.Close %>
</option>
</select>

(in reply to paulaham)
 
 
Post #: 4
 
 
 
  

If you found our site useful please link to us <a href="http://www.visualbasicscript.com">VisualBasicScript.com</a>.
All Forums >> [Scripting] >> WSH & Client Side VBScript >> drop down box with variable selected Page: [1]
Jump to:





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts