PLEASE Help, Method or Datamember not found

Rknight

New member
Local time
Yesterday, 23:52
Joined
Mar 26, 2018
Messages
7
Hi guys. You helped out of a tight stop before hopefully this will work out the same.

I am working with Access 2016 and I am working on a log in form. I have gotten multiple issues and have worked most out. Almost all were because it was older code and needed a Reference Library added. I have seen the code work. Please take a look at the attachments and give me a idea where to go from here.

Pic 1 is code with Compile Error
Pic 2 is Reference Libraries I have checked.

Thanks!
 

Attachments

  • Pic 1 code.jpg
    Pic 1 code.jpg
    98.4 KB · Views: 191
  • pic 2 References.jpg
    pic 2 References.jpg
    96.2 KB · Views: 137
try changing your dim' s to DAO.recordset and DAO.database

other points
opening as snapshot is readonly so does not need to be declared
your findfirst criteria is incorrect - needs to be

"[Username] Like '*" & me.txtUserName & "*'"

Don't think you need the DAO library, it is the default. There was a point in the dim and distant past where ADO was the default, so you needed to declare the DAO library, but think that was around 15 years ago and only lasted for a year or so.

Further down the code at the tempvars assignment line, I suspect that won't work for multivalue fields - I avoid multivalue fields because of the problems with working with them but believe you will need to declare another variable as dao.recordset2 then assign the employee type to it and then work your way through it
 
Cool. I'll try that.

The tempvars is only passing username.

Thanks!!
 

Users who are viewing this thread

Back
Top Bottom