Drop down list box from an underlying table.

Results 1 to 2 of 2

Thread: Drop down list box from an underlying table.

  1. #1
    Join Date
    Dec 1969

    Default Drop down list box from an underlying table.

    Is it possible to display a drop down list box in HTMLASP which is taken from an underlying table and then populate all fields concerned. Something like the way Access may do it !<BR><BR>Thanks,<BR>Dave.<BR><BR>

  2. #2
    Jason Buck Guest

    Default RE: Drop down list box from an underlying table.

    Yes it is:<BR><BR>&#039-------------First connect to your database,<BR>strConnect = "Driver={Microsoft Access Driver (*.mdb)}; DBQ=d:pathtodbexamples.mdb"<BR><BR>objConn.open strConnect<BR><BR><BR>&#039---------Then say you have the following SQL Statement We will use Zip code info for fun)<BR><BR>SQLSTMT = "Select tblPerInfo.USERID, tblPerInfo.LASTNAME, tblPerInfo.FIRSTNAME, tblPerInfo.ZIPCODE FROM tblPerInfo Order By LASTNAME, FIRSTNAME"<BR><BR><BR>set rstemp=objConn.execute(SQLSTMT)<BR><BR>If not rstemp.eof then<BR>response.write "&#060;SELECT name=&#039SELZip&#039&#062;"<BR>Do While Not rstemp.EOF<BR> strUSERID = rstemp("USERID")<BR> strLASTNAME = rstemp("LASTNAME")<BR> strFIRSTNAME = rstemp("FIRSTNAME")<BR> strZIP = rstemp("ZIPCODE")<BR><BR>response.write "&#060;Option value=&#039" & strUSERID & "&#039&#062;" & strLASTNAME & ", " & strFIRSTNAME & " -ZIP- " & strZIP & "&#060;/option&#062;"<BR> <BR> rstemp.movenext<BR> <BR> Loop<BR> response.write "&#060;/select&#062;"<BR><BR>Respectfully,<BR><BR>Jason Buck<BR>webmaster@wnj.com<BR><BR>

Posting Permissions

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