Results 1 to 2 of 2
  1. #1
    Join Date
    Dec 2003

    Unanswered: For...Next loop not working

    What am I missing in the following code? I am getting an 'Object variable or With block variable not set' error.

    Dim rs As Recordset
    Dim x As Integer

    For x = 0 To rs(x)
    If Not IsNull(txtBeginDate) Then
    Me!BeginDate = Me!txtBeginDate
    Exit For
    End If
    Next x

    The purpose here is to update the BeginDate field in all records of the form's recordset. The form's recordset is determined by a query, which seems to work fine.


  2. #2
    Join Date
    Dec 2003

    Re: For...Next loop not working

    Oh...I got now. Need a DoWhile loop.


Posting Permissions

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