Results 1 to 2 of 2

Thread: code errors out

  1. #1
    Join Date
    Jun 2002

    Unanswered: code errors out

    If Forms![frmSplash]![combouser].Column(3) = "admin" Then
    End If

    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.

  2. #2
    Join Date
    Jun 2002
    I figured it out. Seems like forms like the "On Activate" and reports like "On Open".

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts