SUB getZones()'used in extranet/reporting/default.asp - also gets called from Function PulldownDB() Set objRs = server.createobject("ADODB.Recordset") objRs.activeconnection=oConn strSQL = "SELECT min(reporting_id) as reporting_id, visit_zone FROM tblExtranetReport group by visit_zone" objRs.open strSQL If objRs.EOF Then EXIT SUB End If 'Response.Write(StrSQL) 'Response.End() END SUB Function PulldownDB(byRef funcName, ByRef strInputName, ByRef intSize, ByRef blnDisabled, _ ByRef strFirstValue, ByRef strFirstLabel, ByRef varSelectedValue, ByRef strJavascript, value, Label ) 'Usage :PulldownDB(funcName, InputName, Size, IsDisabled?, FirstValue, FirstLabel, SelectedValue(request.value), Javascript, value(db field), Label(db field) ) ' in /includes/customerRequests_object.asp. ' strOutputSelect = PulldownDB("getZones()", "visit_zone", 1, "", 0, "Zone", visit_zone, "onchange=""this.form.submit();""", "visit_zone", "visit_zone" ) ' response.write(strOutputSelect) Dim strDisabled Dim strPulldown Dim varValue, strLabel 'Dim objCon, objCmd, objRs If blnDisabled = True Then strDisabled= " disabled=""disabled""" strPulldown = "" strPulldown = strPulldown & "" PulldownDB = strPulldown 'Response.Write(PulldownDB) End Function