In MS Access, if you want to send/pass a value from one form to another, then this is the answer..
Let's take an example..you are in login page and you have logged in with your credentials, now you are in the home page or any landing page, here you want to show the userName or use userId further,
In login page you write-
UserName = resultSet("username")
TempVars("UserName") = resultSet!username.Value
DoCmd.openForm "HomePage", acNormal, , , , acWindowNormal, openArgs: userName
Now you can use this temporary var in your homepage like this-
Declare variable first -
Dim userName As String
UserName = TempVars("UserName")
Here you have userName with you .
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…