DLookup function in application start up form (1 Viewer)

Petros

Registered User.
Local time
Today, 12:58
Joined
Jun 30, 2010
Messages
145
Hi

Table Signatures. Field names “Username” and “Signature”
“Username” holds the system username (fOSUserName)
“Signature” holds the alias related to the username
Example:
“Username” bertlarsson = “Signature” Bert
How do i write the DLookUp function to match the current fOSUserName() with the “Username” in tables Signatures and display the “Signature” in the startup form
When the user opens the database i want his/hers system username to be replaced by the Signature. I choose this method since i want the users to log in without a login dialog as described in boblarssons “simple login sample” since i have encrypted and assigned one pw for the database

Thanks!
 

DCrake

Remembered
Local time
Today, 11:58
Joined
Jun 8, 2005
Messages
8,632
Code:
MySignature = DLookup("Signature","Signatures","Username='" & FOUserName & "'")
 

Petros

Registered User.
Local time
Today, 12:58
Joined
Jun 30, 2010
Messages
145
Thank you David...i receive an Compile error / Variable not defined for the FOUserName
 

Petros

Registered User.
Local time
Today, 12:58
Joined
Jun 30, 2010
Messages
145
I found it.. i replaced FOUserName with fOSUserName()

Much appriciated David, thanks!
 

DCrake

Remembered
Local time
Today, 11:58
Joined
Jun 8, 2005
Messages
8,632
Code was aircode and supplied as brevity only.
 

Users who are viewing this thread

Top Bottom