I have an Update Page basically to update the record with new data, etc.
The drop down list shows the Selected information from within the table, and the options from another table. The main table with the data to be updated has the information as a #ID from the second table. Basically a Join Query.
What I want to do is to list the SELECTED OPTION as the Name instead of the ID#. When you look at the Drop Down, it will first show the ID#, and if you drop down the list, it will show the names.
My question is how can I make it so that it will not show the Records ID#, but the name itself. Here is my Query and Form Info:
Query:
<%
recnum = Request.QueryString("recnum"
recnum = TRIM(recnum)
sqlString2 = "SELECT Projects.ProjID, Projects.ProjName, Projects.ProjDate, Projects.Department, Projects.Tech, Projects.TechC, Projects.Hours, Projects.Site, Projects.Week, Projects.ProjCount, Projects.Descript, Projects.Severity"
sqlString2 = sqlString2 & " FROM ((Projects INNER JOIN Technicians ON Projects.Tech = Technicians.TechID) INNER JOIN Department ON Projects.Department = Department.DepartmentID)" &_
"INNER JOIN Site ON Projects.Site = Site.SiteID"
sqlString2 = sqlString2 & " WHERE Projects.ProjID =" & recnum
SET RS2 = objConn.Execute( sqlString2 )
%>
Form:
<select name="Department" size="1" class="inputBox" id="Department">
<option selected value="<%=RS2("Department"
%>"><%=RS2("Department"
%></option>
<% WHILE NOT RS5.EOF %>
<option value="<%=RS5("DepartmentID"
%>"><%=RS5("Department"
%></option>
<%
RS5.MoveNext
WEND
%>
</select>
So that the query can run faster and easier, I made it so that it will JOIN the ID instead of the names, which it will take a long time to query in a big database.
Department Table
DepartemntID Department
Project Table
Department, ProjectName, etc.
Department JOINS with DepartmentID.
When I drop down the list to update the Record, I get the # from the actual main table and below it the optional data from the other table.
Anyone can help me with this please?
Thank You Very Much.
The drop down list shows the Selected information from within the table, and the options from another table. The main table with the data to be updated has the information as a #ID from the second table. Basically a Join Query.
What I want to do is to list the SELECTED OPTION as the Name instead of the ID#. When you look at the Drop Down, it will first show the ID#, and if you drop down the list, it will show the names.
My question is how can I make it so that it will not show the Records ID#, but the name itself. Here is my Query and Form Info:
Query:
<%
recnum = Request.QueryString("recnum"
recnum = TRIM(recnum)
sqlString2 = "SELECT Projects.ProjID, Projects.ProjName, Projects.ProjDate, Projects.Department, Projects.Tech, Projects.TechC, Projects.Hours, Projects.Site, Projects.Week, Projects.ProjCount, Projects.Descript, Projects.Severity"
sqlString2 = sqlString2 & " FROM ((Projects INNER JOIN Technicians ON Projects.Tech = Technicians.TechID) INNER JOIN Department ON Projects.Department = Department.DepartmentID)" &_
"INNER JOIN Site ON Projects.Site = Site.SiteID"
sqlString2 = sqlString2 & " WHERE Projects.ProjID =" & recnum
SET RS2 = objConn.Execute( sqlString2 )
%>
Form:
<select name="Department" size="1" class="inputBox" id="Department">
<option selected value="<%=RS2("Department"
<% WHILE NOT RS5.EOF %>
<option value="<%=RS5("DepartmentID"
<%
RS5.MoveNext
WEND
%>
</select>
So that the query can run faster and easier, I made it so that it will JOIN the ID instead of the names, which it will take a long time to query in a big database.
Department Table
DepartemntID Department
Project Table
Department, ProjectName, etc.
Department JOINS with DepartmentID.
When I drop down the list to update the Record, I get the # from the actual main table and below it the optional data from the other table.
Anyone can help me with this please?
Thank You Very Much.