Please lend a hand.....

Results 1 to 3 of 3

Thread: Please lend a hand.....

  1. #1
    Ty Robbins Guest

    Default Please lend a hand.....

    I have created a fairly simple application using principles from the MS Data Form Wizard Tutorial. I have a fully functional application that creates new records, updates current records and has both a list and a form view. <BR><BR>I went to add filter capabilities and the filter works great. The problem is that now the update function doesn&#039;t work correctly. If I update a record, all fields in a textbox update correctly, but any fields in a list box don&#039;t update at all. But they did before I added the filtering capability. <BR><BR>I am thinking that I have an issue with the Data Type that is populating the listboxes. Each listbox&#039;s data is from a separate table that has a data type of varchar 50. <BR><BR>Does anyone have any ideas? Thanks. Ty

  2. #2
    Join Date
    Dec 1969
    Los Angeles, CA

    Default Always show a bit of code

    Only then will we know what you are trying and where we feel you could be wrong

  3. #3
    Ty Robbins Guest

    Default RE: Always show a bit of code

    The update code is this:<BR><BR>&#060;SCRIPT ID=serverEventHandlersVBS LANGUAGE=vbscript RUNAT=Server&#062;<BR><BR>Sub btnUpdate_onclick()<BR>rstTicket.updateRecord<BR>E nd Sub<BR><BR>Sub btnDelete_onclick()<BR>rstTicket.deleteRecord<BR>E nd Sub<BR><BR>Sub btnNew_onclick()<BR>rstTicket.addRecord<BR>End Sub<BR><BR>Sub btnRequery_onclick()<BR>rstTicket.requery<BR>End Sub<BR><BR>&#060;/SCRIPT&#062;<BR><BR>&#060;SCRIPT LANGUAGE=javascript RUNAT=Server&#062;<BR><BR> function ShowRecord(strAbsolutePosition) {<BR> rstTicket.moveAbsolute(parseInt(strAbsolutePositio n));<BR> _fmgrBrafer_SetMode(&#039;FormView&#039;);<BR> }<BR><BR>&#060;/SCRIPT&#062; <BR><BR>These are referencing straight forward implementations of RecordSet, TextBox, and ListBox DTCs.<BR><BR>When I add this code:<BR><BR>&#060;SCRIPT ID=serverEventHandlersVBS LANGUAGE=vbscript RUNAT=Server&#062;<BR><BR>Sub btnUpdate_onclick()<BR>rstTicket.updateRecord()<BR >End Sub<BR><BR>Sub btnDelete_onclick()<BR>rstTicket.deleteRecord<BR>E nd Sub<BR><BR>Sub btnNew_onclick()<BR>rstTicket.addRecord<BR>End Sub<BR><BR>Sub btnRequery_onclick()<BR>rstTicket.requery<BR>End Sub<BR><BR>Sub ApplyFilter()<BR> If Not IsNull(pageBrafer_Test.getFilter()) Then<BR> rstTicket.getRecordSource().Filter = pageBrafer_Test.getFilter()<BR> End If<BR>End Sub<BR> <BR>Sub rstTicket_onbeforeopen()<BR> ApplyFilter<BR>End Sub<BR><BR>Sub pageBrafer_Test_onshow()<BR> If IsNull(pageBrafer_Test.getFilter()) Then<BR> ClearFilter<BR> End If<BR><BR> If pageBrafer_Test.getFilter() = "" Then<BR> btnAllRecords.hide<BR> Else<BR><BR> End If<BR><BR>End Sub <BR><BR>Dim strFilter<BR><BR>Sub FormatFilter(strFld, strInp, strDlm)<BR> strInput = Trim(strInp)<BR><BR> If strInp &#060;&#062; "" Then<BR><BR> If strFilter &#060;&#062; "" Then strFilter = strFilter & " AND "<BR><BR> If UCase(Left(strInput,5)) = "LIKE " Then<BR> strFilter = strFilter & strFld & " " & strInp<BR> Else<BR> strFilter = strFilter & strFld & " = " & strDlm & strInp & strDlm<BR> End If<BR><BR> End If<BR>End Sub<BR><BR>Sub SetFilter()<BR> FormatFilter "ID", txtFilterID.value, "&#039;"<BR> FormatFilter "Status", lstFilterStatus.getValue(), "&#039;"<BR> FormatFilter "AssignedPerson", lstFilterAssignee.getValue(), "&#039;"<BR> FormatFilter "Priority", lstFilterPriority.getValue(), "&#039;"<BR> FormatFilter "DueDate", txtFilterDueDate.value, "&#039;"<BR> FormatFilter "ReportType", lstFilterReportType.getValue(), "&#039;"<BR> FormatFilter "ProductType", lstFilterProductType.getValue(), "&#039;"<BR> FormatFilter "ProblemType", lstFilterProblemType.getValue(), "&#039;"<BR> FormatFilter "FeatureType", lstFilterFeatureType.getValue(), "&#039;"<BR> FormatFilter "EventDate", txtFilterEventDate.value, "&#039;"<BR> FormatFilter "EventTime", txtFilterEventTime.value, "&#039;"<BR> FormatFilter "RoomNumber", txtFilterRoomNumber.value, "&#039;"<BR> FormatFilter "Detail", txtFilterDetail.value, "&#039;"<BR><BR> pageBrafer_Test.setFilter(strFilter)<BR><BR> lblCurrentFilter.setCaption("Current Filter: " & strFilter)<BR><BR> ApplyFilter<BR>End Sub<BR><BR>Sub ClearFilter()<BR> pageBrafer_Test.setFilter("")<BR> lblCurrentFilter.setCaption("Current Filter: [None]")<BR> ApplyFilter<BR>End Sub <BR><BR>&#060;/SCRIPT&#062;<BR><BR>The update function doesn&#039;t work any longer. The TextBoxes update the recordset, but the ListBoxes do not.<BR><BR>Thanks for looking.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts