Although you now have a solution, something like the following should also work and is much neater
Code:
Private Sub Form_Load()
'Loads the user text box on frmSwitch Main and logs event in tbl Log
Me.txtUser = NetUser()
'Loads the form name text box on frm
Me.txtformname = GetActiveFormName()
'Add values to table
CurrentDb.Execute "Insert Into tbl_Log (UserName, fStampOpen) Values ('" & NetUser() & "', '" & GetActiveFormName() & "');", dbFailOnError
End Sub
The INSERT statement now uses the same functions already used to populate the 2 textboxes
Using CurrentDb.Execute means no SetWarnings statements are needed.
Using dbFailOnError means messages still appear in case of code errors
It may be possible to streamline this still further!