Referencing a Global Variable

bunji

Registered User.
Local time
Today, 03:53
Joined
Apr 26, 2005
Messages
124
I am trying to use a global variable in a dlookup but get an error when i try and run the form

Here is the code:

VUserID is my Global Variable.

Private Sub Form_Open(Cancel As Integer)

Dim UsersName As String

Me.WelcomeBox = UsersName

UsersName = DLookup("[Name]", "tbl Password", "[username] = vUserID")

End Sub

Any Ideas
 
UsersName = DLookup("[Name]", "tbl Password", "[username] = '" & vUserID & "'")

???
 

Users who are viewing this thread

Back
Top Bottom