Results 1 to 3 of 3
  1. #1
    New Lounger
    Join Date
    May 2003
    Location
    Detroit, Michigan, USA
    Posts
    16
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Determine Security Group of CurrentUser with ADO (Access 2000)

    I'm trying to control the locked property of a subform based on what security group the current user is a member of. I'm using ADO, not DAO, in this app, and I also have a reference set to the ADO Ext. 2.8 for DDL and Security. This is the first time I've ever used this set of objects, and I'm having trouble figuring out how to do this.

    It seems like I should be able to iterate through the users of a specific group. And if CurrentUser matches one of the members, I can set the locked property of the subform.
    Sounds good in theory - but can I do this?!!! <img src=/S/confused3.gif border=0 alt=confused3 width=45 height=45>

    I know I can always hard code user names and compare CurrentUser directly, but I really don't want to do it that way.

    Has anyone successfully accessed security objects via code? Any help would be greatly appreciated!!!

    Thanks!!

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Determine Security Group of CurrentUser with ADO (Access 2000)

    I know that you want to use ADO, but Microsoft explicitly recommends using DAO for this kind of thing rather than ADOX - see Access Security FAQ; this paper contains sample code to list the users of a group and to determine whether a user is a member of a specific group (section 22).

  3. #3
    New Lounger
    Join Date
    May 2003
    Location
    Detroit, Michigan, USA
    Posts
    16
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Determine Security Group of CurrentUser with ADO (Access 2000)

    Thanks, Hans. As usual you've given me the direction to go in. I'll check out the code samples!!

    Appreciate it!!
    Mike

Posting Permissions

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