Results 1 to 1 of 1
  1. #1
    Join Date
    Sep 2008
    Location
    NM, USA
    Posts
    97

    Question Unanswered: VBA Error 3265 'Item not found..."

    I'm getting this error:
    Run-time error 3265 - Item not found in this collection
    Whenever I try to call a public subroutine from a class module I've written. I can't understand why it's doing this. When I type the dot after my object name, I get the list of data members and methods that comes up, I select the method I want, and when I try to trigger the event that calls that procedure, I get that error.

    I have very carefully checked to make sure the names are spelled right... Here is the relevant code:

    // This is the code in the Class Module
    Code:
    'Public Class Methods
    
    'Find user role that matches username and make assignment
    Public Sub FindUserRole()
        
    Dim db As Database Dim rst As Recordset Dim Roletemp As Integer Dim Ntemp As String Dim i As Integer Set db = CurrentDb Set rst = db.OpenRecordset("RolesView") rst.MoveFirst While Not rst.EOF Ntemp = rst.Fields("User Name")
    If (Ntemp = username) Then UserRole = rst.Fields("RoleID") rst.MoveNext Else rst.MoveNext End If
    Wend
    End Sub

    //This is the code in the Form Module (Just a snippet)
    Code:
    LogonErr = False If Not LogonErr Then
    username = Me.txtuName password = Me.txtuPass With Log1
    .LUserName = username .LPassword = password
    End With Log1.FindUserRole 'This is the line causing the error NameErr = Log1.CheckUserName
    So Can anyone shine any light as to why I'm getting this error? <.< I thank you in advance.
    Last edited by atsukoarai86; 01-12-09 at 12:55.
    "Unix is user friendly... It's just very picky about its friends."

    The best things in life...are well-documented.

Posting Permissions

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