Display username on form- need help ASAP!

slsy1212

Registered User.
Local time
Today, 09:24
Joined
Sep 1, 2004
Messages
13
Hi, hope someone can help with this... I used code from this thread:
http://www.access-programmers.co.uk/forums/showthread.php?t=40346&referrerid=20626 to display the name of the person currently logged in on the main menu.

Basically I made a module declaring a public variable, on the login formhad an afterupdate event of the username combo box assign the variable to whats selected, then in the form with the textbox that displays the username, in the onload event it assigns the variable to the text box.

The problem is, the textbox ends up showing the userID of the person logged in, not the username! i guess this is because the userID is the primary key and is a hidden field on the combo box of the login form.

Does anyone know how to make it select the username and not the userID? Need help fast, thanks!
 
A Db is worth a thousand words

Is this what you are looking for?

See code behind OK button on Login = Section PASSING VARIABLE
There is also a module on the form... First open it and Look at it.

User: Ronald Reagan
Password: Ronald

If it works for you, the Shift bypass key and see code behind the OK button on the LogOn form

and how to get the variable behind the ON LOAD event on user form

If you want to use this code, please remember to set DAO references


This is the updated response for a thread located HERE


Hope this helps
 

Attachments

After looking at this attachment i am unable to open my other database, is there something dodgy in it?
 
fatbloater said:
After looking at this attachment i am unable to open my other database, is there something dodgy in it?

LOL Are you serious?

The sample has been downloaded 13 times, you are the only one that reports that....

Please explain further so I can try and guess the misterious magic that was set free once the Db is open...LOL
 
i set up users etc and now i can not access the db as it says i do not have permission - i am ripping my hair out, can i not roll back or get a tool that removes the permissions?
 
Fat Bloater,

I don't think that It has to do with the attachment at all, rather than with the troublesome ACCESS Security on your Db... Ask for help in the General forum, and do a search on the forum using keywords like ACCESS Security

Chances are you will find an answer there....

I can assure you that the Db in the attachment has nothing to do with your problem.

Post a exact description of what is happening, version of access and layout of your Db so we can try and help you solving your problem.
 
Looks great

How do I see the code behind please?

"Shift Bypass Key" ?
 

Users who are viewing this thread

Back
Top Bottom