Consulting

Results 1 to 4 of 4

Thread: How to Get Permissions in VBA

  1. #1
    VBAX Newbie
    Joined
    Aug 2007
    Posts
    2
    Location

    How to Get Permissions in VBA

    Good Morning,

    I need to reference the current user and that users permissions in VBA.

    Something like;

    If current user does not have add record permission then

    The built in user restrictions for adding new records is a little weak. It does not stop the opening of a add new record form, it just opens the form with no elements. Leaves you staring at a blank form.

    Thanks

  2. #2
    VBAX Guru
    Joined
    Mar 2005
    Posts
    3,297
    Location
    Todd, you need to run the queries in the Security MDW file for the Database, you can't access the tables, but you can run the queries in read only mode and get the information that you want.
    I can'r remember which queries do what though.
    You may also have to set the Tools>Options>View>System Objects to access the queries.

  3. #3
    VBAX Newbie
    Joined
    Aug 2007
    Posts
    2
    Location
    I see the information, but how do I pull the "current user" ID. Once I have that I can query the MsysGroupList table to verify the user is part of the correct group.

  4. #4
    VBAX Guru
    Joined
    Mar 2005
    Posts
    3,297
    Location
    Todd, Application.CurrentUser

Posting Permissions

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