Not finding other form

bloody_football

Registered User.
Local time
Today, 14:00
Joined
Sep 8, 2004
Messages
70
I would like to make a value equal to another value in another form, but it keeps telling me that it can't find the Form.

Code:
newID = Forms![frmLogIn]![UserID]

Error message is 'Access can't find the form 'frmLogIn' referred to in a macro expression or Visual Basic code'.

I have rechecked the spelling and caps on the form name 5 times so that's not it :(

James
 
The message means that frmLogIn is probably not open.
 
Thanks for that; worked it out now :D

Another question - how do I keep the form open and behind everything? If someone closes another form then I want them to go back to the switchboard, not to the open form.
 
Last edited:
How about having the 2nd form open, in hidden mode, when you open the other form? Upon closing your other form, programatically close the 2nd, hidden form.
 
How about:

Declare a public variable in the Start module which stores the UserID when user logs in. Clear the variable when user logs out.
 

Users who are viewing this thread

Back
Top Bottom