Forum Moderators: phranque
Use one recordset
When the value in one dynamic list box changes, update the value in another text box.
For example:
One dynamic list box will contain a list of dates in “August 4, 1999” format. Within the same record is another field with the date in another format “mm/dd/yyyy.” When the text format is selected in the list box, I would like the other text box to be updated with the corresponding “mm/dd/yyyy” format.
If there is another way of doing this, I am all ears.
Any help would be greatly appreciated
<form name="myform">
<select name="from" onChange="passvalue()">
<option value="05/05/05">05/05/05
<option value="06/06/06">06/06/06
<option value="07/07/07">07/07/07
</select>
<P><input type="text" name="to">
</form>
<script language="javascript">
function passvalue(){
document.myform.to.value=document.myform.from[document.myform.from.selectedIndex].value;
}
</script>
function passvalue(){
document.form1.select2.value=document.form1.select[document.form1.select.selectedindex].value;
}
<td> <select name="select" onchange="passvalue()">
<%
While (NOT Weekof.EOF)
%>
<option value="<%=(Weekof.Fields.Item("dweekofvalue").Value)%>"><%=(Weekof.Fields.Item("dweekofvalue").Value)%></option>
<%
Weekof.MoveNext()
Wend
If (Weekof.CursorType > 0) Then
Weekof.MoveFirst
Else
Weekof.Requery
End If
%>
</select>
The goal is to take the date, in text format as "August 10, 2003", and store it from one table, into another table field as date format: mm/dd/yyyy.
The first table has both formats, and I would like to use the date format in another table.
ANother option would be to convert the text field, as displayed in the first dynamic list box, into the date format, display the converted date in the other text field, and store this. IS this possible?