Results 1 to 27 of 27

Thread: Woka your the best ** Resolved **ADO recordset BOF/EOF

Threaded View

  1. #1

    Thread Starter
    Fanatic Member holly's Avatar
    Join Date
    Aug 2002
    Location
    Somewhere on earth
    Posts
    721

    Woka your the best ** Resolved **ADO recordset BOF/EOF

    Hi

    I have a routine which validates and prints a user input but if
    they go back lets say they entered the wrong info I receive and
    error when I try to refresh the results.

    lets say example
    user inputs id - 125336
    and a shift as 5

    the results printed are like so
    5 125336
    Harris

    but lets say they entered the wrong shift so they press the back button and reenter the shift this is were I am reciving the error
    my code will not let me repaint new input...

    VB Code:
    1. Sub cmdbutshft_click(index As Integer)
    2.    'Remember that the first CommandButton in the array is
    3. 'ALWAYS 0. commandbutton array to determine the packers shift
    4.     Dim intCmd As Integer
    5.        If index = 0 Then
    6.           Strshiftletter = Trim$("1")
    7.         ElseIf index = 1 Then
    8.          Strshiftletter = Trim$("5")
    9.         ElseIf index = 2 Then
    10.          Strshiftletter = Trim$("3")
    11.         ElseIf index = 3 Then
    12.          Strshiftletter = Trim$("4")
    13.     End If
    14.      
    15.      Select Case m_Intwndprogress
    16.        
    17.         Case Is = 10
    18.                 txtinformation.Text = Strshiftletter
    19.                 progressbar_login
    20.          
    21.             If Not ObjRSuser.EOF Then
    22.                 PicResultsOperator.Print "Packers_ID"; vbCrLf; Strshiftletter; ObjRSuser.GetString(, , vbCrLf)
    23.                 txtinformation.SetFocus
    24.                 txtinformation.maxlength = 11
    25.                 txtinformation = ""
    26.             End If
    27.             If ObjRSuser.BOF = False Or True Then
    28.             PicResultsOperator.Print "Packers_ID"; vbCrLf; Strshiftletter; ObjRSuser.GetString(, , vbCrLf)
    29.                   txtinformation.SetFocus
    30.                 txtinformation.maxlength = 11
    31.                 txtinformation = ""
    32.         End If
    33.            
    34.    End Select
    35.    For intCmd = 0 To 3 ' Disable caption for each cmd button
    36.             cmdbutshft(intCmd).Caption = ""
    37.              Strshiftletter = vbNullString
    38.    Next intCmd
    39.       Lbltext.Caption = Trim$("Please Enter/code")
    40.        validate_product_code
    41.  End Sub

    Thanks
    Last edited by holly; May 14th, 2003 at 01:44 AM.
    ** HOLLY **

Posting Permissions

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



Click Here to Expand Forum to Full Width