#1
  1. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Mar 2003
    Location
    NIG
    Posts
    4
    Rep Power
    0

    Question ComboBox Item Populating a Form


    Hi All,

    I pls need a help, may be a sample code or something on, I want to be able to search a user with a user code, get a form populate if the user exist in the Database, but at the same time in one corner of the form I want to be able to see the list of other user's code in a ComboBox from the Database, and onclicking on any user code in the ComboBox the same form should be populated with the user' information.

    Right now I have a functional Application but without the ComboBox functionality.

    Thanks

    Abdul
  2. #2
  3. No Profile Picture
    I am here to share knowledge
    Devshed Newbie (0 - 499 posts)

    Join Date
    Apr 2003
    Location
    India
    Posts
    83
    Rep Power
    12
    Try this out may be this can help u

    <html>
    <%
    open the connection here
    run you quary
    get the value of the query in the record set
    %>

    <select name="tl" size="1">
    <option value=""></option>
    <%
    On Error Resume Next
    rs.MoveFirst
    do while Not rs.eof
    %>

    <option value="<%=Server.HTMLEncode(rs.Fields("UserID").Value)%>"><%=Server.HTMLEncode(rs.Fields("UserID").V alue)%></option>

    <%
    rs.MoveNext
    loop%>
    </html>

    where rs is recordset name and UserID the IDname in your table

    try this out I hope u will be able to do the job you want

    Regard
    Rahul
    Rahul

    Small things lead to perfection and perfection is not a small thing.

IMN logo majestic logo threadwatch logo seochat tools logo