Results 1 to 2 of 2
  1. #1
    Patience is offline Advanced Beginner
    Windows XP Access 2003
    Join Date
    May 2010
    Posts
    52

    CurrentUser dependent data in formular

    Hi guys,



    This is my first post in this forum. I am looking very much forward to get started.

    I have a simple problem which I hope you can help me with:

    I would like certain textboxes in a formular to be pre-filled with user dependent data, so that when a particular user logs on, these boxes will automatically be filled with data connected to this unique user.

    How is that done?

    Thanks in advance

  2. #2
    PianoMan64 is offline Novice
    Windows XP Access 2007
    Join Date
    Dec 2009
    Posts
    29

    How to Utilize CurrentUser() Method

    Quote Originally Posted by Patience View Post
    Hi guys,

    This is my first post in this forum. I am looking very much forward to get started.

    I have a simple problem which I hope you can help me with:

    I would like certain textboxes in a formular to be pre-filled with user dependent data, so that when a particular user logs on, these boxes will automatically be filled with data connected to this unique user.

    How is that done?

    Thanks in advance
    You will need to create a table that will house your user specific data that you're wanting to populate on the form. Please also include the username that the user is going to be using as one of the fields in the table that you create. You would also have to create a Workgroup file with all the users in it. They will need access to all Table, queries, forms, report, macro as required. Please make sure that they are also NOT included in the Admin rights, otherwise they will be able to change permissions. After completing all that, you then create a separate MDB and associate the Workgroup File (MDW) to your current project. Since this functionality has been limited in MS Access 2007, the way I know how to get to this is in the Immediate Window type docmd.RunCommand acCmdWorkgroupAdministrator

    Click Join and then point to the MDW file that was created ealier.

    If you don't know how to do this, there are website that can teach you this process.

    Once joined, then you start creating your users. You can use the wizards to help you with that.

    After all that, then you would create a form in the new MDB file and utilizing the CurrentUser() method in MS Access. This will tell you the name of the user that is currently logged in utilizing the MDW file.

    If it returns Admin, then you haven't joined the correct MDW File. Once you do, it will ask you to login with a username and password that was setup in the Workgroup File (MDW).

    Using the currentuser() value, you then create a connection to your table utilizing either DAO or ADO and return the recordset for that user.

    If you need code examples, please let me know.

    Hopefully that helps,

    Joe P.

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

Similar Threads

  1. Replies: 0
    Last Post: 12-16-2009, 09:28 AM
  2. 3 Related Dependent Tables
    By jbarrum in forum Access
    Replies: 0
    Last Post: 11-17-2009, 11:27 AM
  3. Dependent Combo Box
    By tigers in forum Forms
    Replies: 1
    Last Post: 06-16-2009, 12:46 PM
  4. Replies: 3
    Last Post: 02-26-2009, 10:17 AM
  5. Setting a field to be dependent on another
    By CushingMT in forum Forms
    Replies: 0
    Last Post: 11-19-2008, 11:51 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