Results 1 to 2 of 2

Thread: shwetica

  1. #1
    Join Date
    Dec 1969

    Default shwetica

    if i have a table in ms access having details of a department like office name etc and i want in a drop down menu all the office names to be fetched in the drop down menu automatically how do i do it?

  2. #2
    Join Date
    Dec 1969

    Default RE: shwetica

    If the drop-down is in Access...<BR><BR>Make a query to select DISTINCT office names, then tell MS Access to get the data for the drop-down from that query. Access 2000 has a wizard when you insert the drop-down onto a form, don&#039;t know about 97, but you can set it through the properties of the drop-down.<BR><BR>If the drop-down is on an ASP page...<BR><BR>Make a query to select DISTINCT office names, then cycle through the data returned inserting the values into the &#060;option&#062; each time, eg.<BR><BR>Response.Write("&#060;select name=office_name&#062;")<BR>If NOT Data.BOF<BR>Do<BR>Response.Write("&#060;option&#06 2;" & Data("office_name") & "&#060;/option&#062;")<BR>Data.MoveNext<BR>Loop Until Data.EOF<BR>End If<BR>Response.Write("&#060;/select&#062;")<BR><BR>Don&#039;t forget to close the recordset and connection when you&#039;re done :)<BR><BR>Chris

Posting Permissions

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