Results 1 to 5 of 5
  1. #1
    Join Date
    Nov 2005
    Posts
    9

    Unanswered: returning current security user or user group?

    How can I return a current user name or user group through vba code? for instance, what if I want my forms to log who entered data. And I need it to be the user id set up within access, not the computer name or windows user id.

    thanks

  2. #2
    Join Date
    Feb 2004
    Location
    One Flump in One Place
    Posts
    14,912
    Hi

    I don't use MDWs and Access security so this is untested in the field but Application.CurrentUser should return the current user.
    HTH
    Testimonial:
    pootle flump
    ur codings are working excelent.

  3. #3
    Join Date
    Nov 2005
    Posts
    9
    awesome, now I just need to figure out how to return the group of that user.. anyone else have any suggestions?

    thanks

  4. #4
    Join Date
    Nov 2004
    Location
    out on a limb
    Posts
    13,692
    Provided Answers: 59
    This thread has an attachment with some generic security functions, although there is nothing in attachement that does exctly what you want, there is a function which checks to see if a person is a member of the a specified group. I know it is possible to rephrase the function, or copy it to another function, so that you could query which groups a person is a member of. If I remember it correctly there are 2 collections users and groups which are interlinked. So you could cycle through a members groups or a groups memers depending which collection ou use

    Incdentally a user may be a member of many groups, just as a group may be comprised of many members.

    Out of curiosity what makes you want the access user rather tan the netork user. I've always found the access user far easier to fake than the network user. As network logons are changed more frequently and use much more rigorous password evaluation they are more secure than Access userids. Far too many sites using workgroup security have no effective security as the userid's & passwords are commonly known.
    Last edited by healdem; 12-20-05 at 14:36.

  5. #5
    Join Date
    Nov 2005
    Posts
    9
    Thanks for the info.

    My reasons are mostly due to what I will be using the database for, my limited networking experience and my boss's eccentricities to randomly move computers and parts around. Basically I am trying to convert the small business I'm working for (5 total employees with hopes to grow in 2006) to a paperless office. At the moment, they take data, write it down to paper, then enter it into a computer using an old version of act!, which creates multiple database files randomly strewn across the network. The plan currently is to get a centralized database that multiple users can access through our LAN with better security and some form of user entry intengrity (I am basically the only IT savvy person here, so this hopefully will be secure enough for now). The network currently consists of computers running XP each with only a primary admin ID. (I could probably figure out how to make actual remote network logins for individuals like I used to use at college, but for now that is too much work). Anyway, I'm just going on my C programming experience from college and I am teaching myself as I go (which for the most part has been fairly easy except for running into annoying microsoft limitations, and my dislike of VB/VBA), if in the future it proves to be less than what we need as we expand, we would probably just look into doing a straight VB/SQL application/database. But for now I'm just taking it one step at a time building it up and going from there.

Posting Permissions

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