Unanswered: VBA Error 3265 'Item not found..."
I'm getting this error:
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.
Run-time error 3265 - Item not found in this collection
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
'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")
While Not rst.EOF
Ntemp = rst.Fields("User Name")
If (Ntemp = username) Then
UserRole = rst.Fields("RoleID")
//This is the code in the Form Module (Just a snippet)
So Can anyone shine any light as to why I'm getting this error? <.< I thank you in advance.
LogonErr = False
If Not LogonErr Then
username = Me.txtuName
password = Me.txtuPass
.LUserName = username
.LPassword = password
Log1.FindUserRole 'This is the line causing the error
NameErr = Log1.CheckUserName
Last edited by atsukoarai86; 01-12-09 at 11:55.
"Unix is user friendly... It's just very picky about its friends."
The best things in life...are well-documented.