I know its probably been asked a million times - however I can't seem to get any examples to work..
In Module1 I have a line: Global gvarMyEmpID As Integer
I then have an opening splash page for the logon process that has a drop down of the employees and an Enter Button
The Enter Button has some code that includes....
gvarMyEmpID = Me!AgentID.Valu e
SQLtxt = "UPDATE [Version Control] SET [Version Control].[Last Agent] = " & gvarMyEmpID & ";"
DoCmd.RunSQL SQLtxt
I then have the Opening Splash Page close and then the Menu appears - With a text box that has the gvarMyEmpID in the control source however all I get when I run the screen in Form View is "#Name?" in the box.
How can I use this variable in textboxes, Queries - in rowsources, and Event Procedure Code on other pages?
In Module1 I have a line: Global gvarMyEmpID As Integer
I then have an opening splash page for the logon process that has a drop down of the employees and an Enter Button
The Enter Button has some code that includes....
gvarMyEmpID = Me!AgentID.Valu e
SQLtxt = "UPDATE [Version Control] SET [Version Control].[Last Agent] = " & gvarMyEmpID & ";"
DoCmd.RunSQL SQLtxt
I then have the Opening Splash Page close and then the Menu appears - With a text box that has the gvarMyEmpID in the control source however all I get when I run the screen in Form View is "#Name?" in the box.
How can I use this variable in textboxes, Queries - in rowsources, and Event Procedure Code on other pages?
Comment