Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Help with Asigning a name!

Status
Not open for further replies.

AccessXP

IS-IT--Management
Jan 29, 2002
132
I have a form that users input data. The form is a short cut on everyone's desktop I need that users name only on that form and to record it to the table when the sale is made.

Example.

On joe's form his name for salesperson is joe
On mary's form here name for salesperson is mary

It need's to hard coded so users cannot change the name and give credit to someone else when the sale is made.

Thanks for any help.
 
AccessXP

There are two ways you can approach this, the first is if you are using a novell server or NT server you can use the windows environ command we use Novell so I can call Environ("username") this will supply me with the users novell login name, I then have a table that has a lookup for each login name so the table reads
field names txtLoginName txtUsername
Values russec Chris Rusell

On the AfterUpdate event of the form I would code something like
[txtCreateBy] = Environ("Username")

The other method is if you use access security you can set an account for each user and either get them to log in or have set the shortcut to log in for them, you can then refer to there access login name (it was CurrentUser in access v.2) in much the same method as the novell method.

hope this gives you help

Cheers

Chris

 
Thanks for the response i will give it a try.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top