Storing UserID in forms (1 Viewer)

dackedyman

New member
Local time
Today, 16:43
Joined
Aug 3, 2019
Messages
9
I know this topic has been discussed before, but I guess I am just not understanding the solutions well enough.

For my company, I must develop a login form to access the database, which I have done. I want to be able to use the UserName variable during the login to show on another form when a new record is created. Furthermore, in the sub-form on that same screen, is a call log. Each time a person creates a new call log entry, I want a field to show who created that log using their UserName.

While doing research, I did read about creating a TempVar method during the login process:
TempVars.Add "User", your login information

And then creating a function to pull that information:
Public Function LoginInfo()
LoginInfo = TempVars("User").Value
End Function

I am not sure how to implement that approach.

Any help would be appreciated.

Thank you.
 

theDBguy

I’m here to help
Staff member
Local time
Today, 16:43
Joined
Oct 29, 2018
Messages
21,358
Hi. Once you create a TempVar, you shouldn't need a function to get its value. A TempVar is accessible pretty much from everywhere.
 

dackedyman

New member
Local time
Today, 16:43
Joined
Aug 3, 2019
Messages
9
Can you help me to further understand what a TempVar is and how I can use it for my purposes? Is there any code of mine that you would need to see?
 

Users who are viewing this thread

Top Bottom