I would like to declare a Public Function or Public Variable

  • Thread starter Thread starter Henro
  • Start date Start date
H

Henro

that returns the NAME of the current user, not his logon-id in my Database

I will try to explain:

I have a table including all of the user's details.
Amongst them are Name and login code

tblEngineer
Name
LogonID

In different query's I can sort the user relevant data using the
currentuser() but in some places I need to to that by Engineer.Name.
I want to declare a public variable (f.e. CurrentName) that I can use to
select data from a query that only returns data in which the current users
NAME is mentioned.

Any idea's how to do that?

TIA Henro
 
The function would look like:


Function GetFullName() as string

GetFullName = dlookup("Name","tblUsers","LogonID = '" & currentuser() &
"'")

end function
 
Back
Top