Can't find the field '|1'

chellebell1689

Registered User.
Local time
Today, 05:32
Joined
Mar 23, 2015
Messages
267
Hello, I watched a series of youtube videos last year on making a login system for my db that I was working on at the time. I wanted to add it to the one I'm working on now, so I copied everything over (forms, tables, code, etc) and made a couple minor mods (renamed a field, removed a table that was solely to look up for a field), in other words stuff I didn't need.

The old log in still works, but this new one, I'm basically stopping every few lines to debug. My current problem is it says it "cannot find the field '|1' referenced in my expression". When I hit debug, the line it highlights is "TempUserID = Me.[UserID].Value" I've compared the field name with the field in the table and they match. That table currently has only one line of data which is the user I'm working with to make sure it all works.

I'm not sure where I'm going wrong...I greatly appreciate any and all help!
I copied the code into notepad, saved it and attached it so it's available if you need it. There's a bit of code to it, so I did it that way.
 

Attachments

In the expression "TempUserID = Me.[UserID].Value" UserID is the name of a form control not the name of a table field. Do you have this code location in a form's module with a text box or combo box with the name UserID?

This code can't be in a separate module, if that's what you are trying.
 
So I went back to my form in my new database to check for your solution. As I was comparing the working login form against the one I'm working on I noticed the "source" had not been entered. This fixed the problem! Thank you so much!!
 

Users who are viewing this thread

Back
Top Bottom