<% function WriteOptionsFromRS(ByRef prstIn, ByVal pstrValueField, ByVal pstrTextField, ByVal pvntChoosenValue) dim strSelected do while not prstIn.EOF if pvntChoosenValue = prstIn.Fields.Item(pstrValueField).Value then strSelected = " SELECTED" else strSelected = "" end if Response.Write "" prstIn.MoveNext loop end function %>