working on this at the moment, thought i’d swing by the lounge…
in the Login form, there’s this:
Option Compare Database Public globalUserID As String Public globalClassification As String Option Explicit
the var gets loaded here:
Public Sub cmd_OK_Click() ... logic to confirm/deny login... globalUserID = rsLogin("USER_ID").Value globalClassification = rsLogin("Classification").Value DoCmd.Close acForm, "Login" 'DoCmd.OpenForm "Background" DoCmd.OpenForm "RUG" End Sub
As you can see, the login form is closed and control is passed to the form RUG. in “On Load” I try this:
Dim globalUserID As String MsgBox "Welcome, " & globalUserID
Do i need to call the public function from the Login? I tried that and it says “Sub or Function Not Defined”.
All I want to do is capture the logged in user’s ID in memory and, once the edits are processed and finalized by the user, write that value to the underlying table(s) that handle the edits.
TIA