H
Heather
Here's my project:
I have an Access database with 2 tables: PhoneList and DepartmentList.
PhoneList is the main table which includes Name, Title, PhoneNumber,
Department, etc. The Department field is connected to the
DepartmentList table via a drop-down list. In the DepartmentList
table, I only have one field: DepartmentName.
In Frontpage 2002, I have successfully created the following:
Search the database via Last Name. A list is created, and I can click
on "Edit" to edit one record. Edit.asp is then opened displaying the
currrent values for that record. I mostly have text boxes wherein I
can change the phone, title, but I want to have the Department field
be populated from the DepartmentList table.
Here's my code below for the department field on the Edit.asp page.
It currently only list the current department name; it does not list
the rest of the departments. I do not know much ASP, so I probably
have the syntax wrong. Please help!
<select size="1" name="Department">
<option selected
value="<%=FP_FieldHTML(fp_rs,"Department")%>"><%=FP_FieldHTML(fp_rs,"Department")%></option>
<% while NOT DepartmentList.EOF %>
<option value="<%=DepartmentList("DepartmentName")%>"><%=DepartmentList("DepartmentName")%></option>
<%
DepartmentList.MoveNext
wend
%>
</select>
I have an Access database with 2 tables: PhoneList and DepartmentList.
PhoneList is the main table which includes Name, Title, PhoneNumber,
Department, etc. The Department field is connected to the
DepartmentList table via a drop-down list. In the DepartmentList
table, I only have one field: DepartmentName.
In Frontpage 2002, I have successfully created the following:
Search the database via Last Name. A list is created, and I can click
on "Edit" to edit one record. Edit.asp is then opened displaying the
currrent values for that record. I mostly have text boxes wherein I
can change the phone, title, but I want to have the Department field
be populated from the DepartmentList table.
Here's my code below for the department field on the Edit.asp page.
It currently only list the current department name; it does not list
the rest of the departments. I do not know much ASP, so I probably
have the syntax wrong. Please help!
<select size="1" name="Department">
<option selected
value="<%=FP_FieldHTML(fp_rs,"Department")%>"><%=FP_FieldHTML(fp_rs,"Department")%></option>
<% while NOT DepartmentList.EOF %>
<option value="<%=DepartmentList("DepartmentName")%>"><%=DepartmentList("DepartmentName")%></option>
<%
DepartmentList.MoveNext
wend
%>
</select>