View Full Version : Making option box select from lookup table

12-09-2003, 05:38 PM
I'm not of the logic behind this, or even the correct wording to describe it to you, but here goes:

I have a "Modify Record" page. The page is passed a URL parameter which is the record ID. Part of the record is a 'Category'. In the database, this field is a lookup table. How can I get a drop-down menu on the "Modify Record" page to recognize the lookup table? Playing with Dreamweaver, I've gotten it to show "3", which is the correct ID of the category. But what I'd like is to have a drop-down menu of the category names, with the correct one being displayed.

In my database I do have two different tables, one for the records, and one for the category names. I also have 2 recordsets, one for each table.

Here is the Dreamweaver-created code for my option box:

<select name="select">
While (NOT rs_AdminProjCat.EOF)
<option value="<%=(rs_AdminProjCat.Fields.Item("Category").Value)%>">
If (rs_AdminProjCat.CursorType > 0) Then
End If

The current code shows all the category names, but does not select the one that is associated with the record (note, the correct category is selected for all records when viewing the database).

12-09-2003, 09:49 PM

12-10-2003, 07:34 PM
Well, since you fixed it yourself before anyone was able to help, I'll go ahead and close the thread. :)