Results 1 to 14 of 14
  1. #1
    focosi is offline Advanced Beginner
    Windows XP Access 2010 32bit
    Join Date
    Jul 2011
    Posts
    97

    How to call the "User accounts and groups" menu prompt via button on form


    Does anyone know how to call that menu function by VB code ?
    I would like to add a button to the opening form in order to let users easily set/change the password in my user-level secured database..
    I have disabled full menu so there is no way to access the prompt via menu bar.
    I am also looking for a way to prompt them to periodically change their passwords. Can anyone help ?
    Thanks

  2. #2
    rpeare is offline VIP
    Windows XP Access 2003
    Join Date
    Jul 2011
    Posts
    5,442
    Have you provided them with a form to change their PW, is the PW local to access or are you pulling login information from your network?

    I can't imagine you mean to give them access to user accounts other than in Access but one never knows!

  3. #3
    focosi is offline Advanced Beginner
    Windows XP Access 2010 32bit
    Join Date
    Jul 2011
    Posts
    97
    no, there is no special form for changing pw yet. I hope to find a way to place a button that opens the official Access interface for changing the pw of the logged user only.
    This has nothing to do with login to network, just login to the user-level secured db.
    Any idea ?

  4. #4
    rpeare is offline VIP
    Windows XP Access 2003
    Join Date
    Jul 2011
    Posts
    5,442
    Right, you will have to provide them with a method to change their password, this means building a form so that after they have logged in they can click a button and got to a password editing form where they can change their information and save it. There's no 'automatic' way for them to do this with menu items. It's something you will have to provide through forms etc.

  5. #5
    focosi is offline Advanced Beginner
    Windows XP Access 2010 32bit
    Join Date
    Jul 2011
    Posts
    97
    ok, so there is no way to call any item in the menu via vb code, right ? I wondered whether shortcut existed : e.g. I know I can call "print" via a button.... I hoped this could be done also for other menu items that can be placed in the quick access menu on the top....
    So, what is the function I have to call in my "Change pw" form in order to let the current user modify his/her own password stored in Protection.mdw ?

  6. #6
    focosi is offline Advanced Beginner
    Windows XP Access 2010 32bit
    Join Date
    Jul 2011
    Posts
    97

    call a menu function via vb code

    I have already posted this in the "Form" section of the forum, but maybe this section is more appropriate. I am looking for a way to prompt the default Access "user accounts and groups" interface for user-level security (or other menu voices) via a button on a form, so that, even when full menus are disabled, a user can set or change is password.
    Functions are welcomed !
    Thx
    Last edited by RuralGuy; 07-26-2011 at 03:35 PM. Reason: Merged the two threads.

  7. #7
    rpeare is offline VIP
    Windows XP Access 2003
    Join Date
    Jul 2011
    Posts
    5,442
    you don't need to call menus. let's say you create a form that allows the current user to change their PW, they would log into your database first. Once that information is captured (the userID) you can use that as a data source for your password changing form let's call it 'frmChangePW' and you want to open it you would create a button on your form main form, scroll down to the ON CLICK property of the button and type in

    docmd.openform "frmChangePW"

    You would just have to look up the current user's PW, make them type that in, and give them two other fields to type in their new password, check to see if the two new passwords match then perform an update to your users table.

    I would recommend that your change pw form be unbound though that is up to you, it's just easier for me to conceptualize this way than a bound form.

  8. #8
    focosi is offline Advanced Beginner
    Windows XP Access 2010 32bit
    Join Date
    Jul 2011
    Posts
    97
    Quote Originally Posted by rpeare View Post
    you don't need to call menus. let's say you create a form that allows the current user to change their PW, they would log into your database first. Once that information is captured (the userID) you can use that as a data source for your password changing form let's call it 'frmChangePW' and you want to open it you would create a button on your form main form, scroll down to the ON CLICK property of the button and type in

    docmd.openform "frmChangePW"

    You would just have to look up the current user's PW, make them type that in, and give them two other fields to type in their new password, check to see if the two new passwords match then perform an update to your users table.

    I would recommend that your change pw form be unbound though that is up to you, it's just easier for me to conceptualize this way than a bound form.
    What do you mean by "your users table" ??? is this a system table ? I don't want to create new tables for user names and passwords, just use the default one in Access... Is this possible ?

  9. #9
    rpeare is offline VIP
    Windows XP Access 2003
    Join Date
    Jul 2011
    Posts
    5,442
    Oh so you want to set a database password? If one person changes it it's changed for everyone unless you're giving each person their own front end.

    Is that really what you want to do.

    Let's say you and I are sharing a database, if I change the database password and don't tell you you can't get in.

    At any rate here is some code that will help you:

    http://msdn.microsoft.com/en-us/libr...ffice.10).aspx

  10. #10
    focosi is offline Advanced Beginner
    Windows XP Access 2010 32bit
    Join Date
    Jul 2011
    Posts
    97
    no, I don't want to set a database password (which is obviously valid for everyone).
    My database already has user-level security implemented, so the user "xxx" can log in using his/her username "xxx" and password "yyy". Once logged in, I would like he/she to find a button on the form that, once clicked, calls the "Account groups and users" menu function in Access (ideally directly the "Change password" tab in that function !) and let the user change his/her current password ("yyy") in a new one (let's say "zzz") without affecting other users' passwords (that's how user-level security works !).

  11. #11
    rpeare is offline VIP
    Windows XP Access 2003
    Join Date
    Jul 2011
    Posts
    5,442
    Ok I am not familiar with what you're doing, the only two methods of database security I've had cause to use were creating my own security username/pw within access itself (which you say you're not doing) and having a password on the database itself (which you say you're not doing either) so I don't know that I can help, sorry.

    It sounds like you're using workgroups which I have no experience with.

  12. #12
    focosi is offline Advanced Beginner
    Windows XP Access 2010 32bit
    Join Date
    Jul 2011
    Posts
    97
    Quote Originally Posted by rpeare View Post
    Ok I am not familiar with what you're doing, the only two methods of database security I've had cause to use were creating my own security username/pw within access itself (which you say you're not doing) and having a password on the database itself (which you say you're not doing either) so I don't know that I can help, sorry.

    It sounds like you're using workgroups which I have no experience with.
    Yes, I'm using workgroups. Anyone in the forum having experience on workgroups or vba programming for calling/modifying workgroups ?

  13. #13
    rpeare is offline VIP
    Windows XP Access 2003
    Join Date
    Jul 2011
    Posts
    5,442
    http://www.tek-tips.com/viewthread.c...3997&page=1090

    maybe this will put you on the right track.

  14. #14
    focosi is offline Advanced Beginner
    Windows XP Access 2010 32bit
    Join Date
    Jul 2011
    Posts
    97
    found !
    Commandbar was the right track !

    http://www.devhut.net/2010/11/19/ms-...ange-password/

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 16
    Last Post: 07-22-2011, 09:23 AM
  2. "Group By" causes "ODBC--Call Failed" error
    By kaledev in forum Queries
    Replies: 1
    Last Post: 03-09-2011, 02:43 PM
  3. Replies: 7
    Last Post: 01-19-2011, 10:39 AM
  4. Replies: 3
    Last Post: 02-23-2010, 06:32 PM
  5. Replies: 1
    Last Post: 10-19-2009, 02:37 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums