Results 1 to 3 of 3

Thread: (Resolved)Help!!!!

  1. #1

    Thread Starter
    Lively Member jk9694's Avatar
    Join Date
    Dec 2001
    Posts
    78

    (Resolved)Help!!!!

    Ok, I don't know if its just because im tired or what, but i can't seem to see why i am getting a loop without do error in the code below:

    Set Db = OpenDatabase("C:\Program Files\AmateurLogBook\db2.mdb")
    strSQL = "SELECT * From LogBook"
    Set Rs = Db.OpenRecordset(strSQL, dbOpenDynaset)

    Do While Not Rs.EOF
    Set myitem = lvwLogBook.ListItems.Add(, , Str(intRecNum))
    If Not IsNull(Rs("Date")) Then
    myitem.SubItems(1) = Rs("Date")
    End If
    If Not IsNull(Rs("Call")) Then
    myitem.SubItems(2) = Rs("Call")
    End If
    If Not IsNull(Rs("Power")) Then
    myitem.SubItems(3) = Rs("Power")
    End If
    If Not IsNull(Rs("Sent")) Then
    myitem.SubItems(4) = Rs("Sent")
    End If
    If Not IsNull(Rs("Received")) Then
    myitem.SubItems(5) = Rs("Received")
    End If
    If Not IsNull(Rs("ContactTime")) Then
    myitem.SubItems(6) = Rs("ContactTime")
    End If
    If Not IsNull(Rs("Freq")) Then
    myitem.SubItems(7) = Rs("Freq")
    End If
    If Not IsNull(Rs("Mode")) Then
    myitem.SubItems(8) = Rs("Mode")
    End If
    If Not IsNull(Rs("City")) Then
    myitem.SubItems(9) = Rs("City")
    End If
    If Not IsNull(Rs("State")) Then
    myitem.SubItems(10) = Rs("State")
    End If
    If Not IsNull(Rs("Country")) Then
    myitem.SubItems(11) = Rs("Country")
    End If
    If Not IsNull(Rs("County")) Then
    myitem.SubItems(12) = Rs("County")
    If Not IsNull(Rs("Comments")) Then
    myitem.SubItems(13) = Rs("Comments")
    End If
    intRecNum = intRecNum + 1
    Rs.MoveNext
    Loop
    txtRecNumber.Text = Str(intRecNum)

    End Sub

    Please help me out here
    Last edited by jk9694; Jan 16th, 2002 at 07:42 PM.

    Have a great day!!

  2. #2
    Fanatic Member invitro's Avatar
    Join Date
    Jan 2000
    Location
    Outside your window
    Posts
    547

    Talking

    There is no End If in the 2nd IF statement from the bottom...
    I think ur tired
    ok, so... windows takes 1 minute to search for a file on my PC yet google.com takes 1 second to search the entire internet?

  3. #3

    Thread Starter
    Lively Member jk9694's Avatar
    Join Date
    Dec 2001
    Posts
    78
    Thanks, i must be getting tired

    Have a great day!!

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