Results 1 to 3 of 3
  1. #1
    Join Date
    Jan 2003
    Posts
    52

    Unanswered: Item not found in this collection. (Error 3265), plz help, emergency

    I m using MS Flexgrid for viewing data retreived. this is the code
    and at the end i'll tell ya da problem
    Dim db As DAO.Database
    Dim rs As DAO.Recordset
    Dim s As Integer
    Set db = OpenDatabase(App.Path & "\RisingSunReg.mdb")
    Set rs = db.OpenRecordset("SELECT * FROM StudentPersonalDetails", dbOpenSnapshot, dbReadOnly)
    s = rs.RecordCount
    fg_ReportSimple.FormatString = "Roll # |" & "Name |" & "Date of Birth |" & "Gender |" & "Religion |" & "Nationality |" & "Previous School |" & "Nationality |" & " Transport Facility |" & "Present Address |" & "Present Tel |" & "Permanent Address |" & " Permanent Tel |"

    While Not rs.EOF
    fg_ReportSimple.AddItem rs.Fields(0) & Chr(9) & rs.Fields(1) & Chr(9) & rs.Fields(2) & Chr(9) & rs.Fields(3) & Chr(9) & rs.Fields(4) & Chr(9) & rs.Fields(5) & Chr(9) & rs.Fields(6) & Chr(9) & rs.Fields(7) & Chr(9) & rs.Fields(8) & Chr(9) & rs.Fields(9) & Chr(9) & rs.Fields(10) _
    & Chr(9) & rs.Fields(11)

    rs.MoveNext
    Wend


    basically it gets all the data for me, uptill rs.Fields(10) but when i try to get the 11th field it gives the error i.e

  2. #2
    Join Date
    Nov 2002
    Posts
    150

    Re: Item not found in this collection. (Error 3265), plz help, emergency

    You sure there are 12 fields? Put this line right after you open the recordset to find out: MsgBox rs.Fields.Count

  3. #3
    Join Date
    Jan 2003
    Posts
    52

    Re: Item not found in this collection. (Error 3265), plz help, emergency

    Originally posted by FirstAndGoal4
    You sure there are 12 fields? Put this line right after you open the recordset to find out: MsgBox rs.Fields.Count
    ahh u were rite, i had one header title twice and i was counting it as one, so that was the mistake, thanx alot

Posting Permissions

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