If Forms![frmSplash]![combouser].Column(3) = "admin" Then
The above code is placed in the "On Open" event of a report. It checks against a simple user logon form's combo box to see if the admin user is logged in or not. If the "admin" user is logged in it will open the form/report if not it will close the form/report. It's my simple answer to simple security. Anyways, it works great on some reports/forms on the "On Open" event. On others I have to use the "On Activate" event. On others it just errors out giving the following error:
Run-time error 2585
This action can't be carried out while processing a form or report event.
The error only happens when a non "admin" user is logged on.
On debug it highlights the "DoCmd.Close". If anyone knows a work around please let me know. It's weird that it works on some but not others.