Results 1 to 2 of 2
  1. #1
    Join Date
    Jun 2017

    Unanswered: Run 1 button as administrator in access

    Hi all,
    I have a form with 3 buttons. I want the user to change to administrator on the last button to complete the import into our database. Would that be able with VBA code?

  2. #2
    Join Date
    Apr 2014
    Provided Answers: 33
    i have a table with userIDs and their rights level
    bob smith, bob123, A (admin)
    jim jones, jim432, M (manager)

    user opens the app, the main form appears, the form grabs their ID,etc...

    sub form_load()
    txtUser =  Environ("Username")
    txtLevel = Dlookup("[Level]","tUsers","[userID]='" & txtUser & "'") & ""
         'enable the button for the admin only
      btn3.enabled = txtLevel="A"
    end sub

Posting Permissions

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