Page 2 of 2 FirstFirst 12
Results 16 to 27 of 27
  1. #16
    billgyrotech1 is offline Competent Performer
    Windows 10 Access 2010 64bit
    Join Date
    May 2019
    Posts
    179
    This may be too advanced for me about the global variable or TempVars.



    I would like to assign the correct form to the user level but not sure how to do this. I probably didn't ask correctly on how to do this.

  2. #17
    billgyrotech1 is offline Competent Performer
    Windows 10 Access 2010 64bit
    Join Date
    May 2019
    Posts
    179
    Could the code for the Login button on the Login form have "if statements" that check the user level and assign the correct AFRs form to the button "Open AFR" on the Switchboard form?

  3. #18
    billgyrotech1 is offline Competent Performer
    Windows 10 Access 2010 64bit
    Join Date
    May 2019
    Posts
    179
    I have to leave for the evening and will check back in the morning thank you very much for your help.

  4. #19
    June7's Avatar
    June7 is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,815
    I don't think so because of the nature of old style Switchboard form.

    I already explained several methods to make user info available to multiple forms/procedures, none of which involve Switchboard configuration.

    Switchboard setup is too constraining. Use a normal form with macros or VBA.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  5. #20
    billgyrotech1 is offline Competent Performer
    Windows 10 Access 2010 64bit
    Join Date
    May 2019
    Posts
    179
    Hi June7,

    I created a new form called "Main Form" and put the command buttons for each version of the AFRs forms. It is the form set to open when opening the database. Does this help?

    Thank you,
    Bill

  6. #21
    orange's Avatar
    orange is online now Moderator
    Windows 10 Access 2010 32bit
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,716
    Bill,

    I recommend you mock up your basic scenario.
    Say 3 or 4 forms - they just have to be forms with different names that can be available or not based on security level/user type.

    A user/employee table , an EmployeeType table, and table for EmployeeCanAccessForm (as per S Bishop).
    A login screen that checks username and password.
    The Login button on the login screen needs logic (along the lines of the S Bishop video) to show/not show Form.

    I decided to make a mock up myself and have attached a zip file with the database file and a document file in Word that describes the mockup. It is intended to show how to manage who has access to certain forms. It does not deal with custom ribbons, no right click menus, encryption etc. that you can add to your application to prevent misuse.

    Good luck.
    Attached Files Attached Files

  7. #22
    billgyrotech1 is offline Competent Performer
    Windows 10 Access 2010 64bit
    Join Date
    May 2019
    Posts
    179
    Hi Orange,

    I have been doing some editing and came up with a Main Form that opens initially. I put 4 different command buttons as to which AFRs form to open.

    I then password protected the first three which have different levels of protection:

    AFRs1 is administrator will full access
    AFRs2 is for the Clerk which only has the initial fields visible
    AFRs3 is for the Technicians which has the 'Clerk' fields locked

    AFRs4 is read only so it doesn't need password protection.

    What do you think?

  8. #23
    billgyrotech1 is offline Competent Performer
    Windows 10 Access 2010 64bit
    Join Date
    May 2019
    Posts
    179
    I see a problem with my approach. I want the main form to always be there in another tab.

    What did I do wrong?

  9. #24
    orange's Avatar
    orange is online now Moderator
    Windows 10 Access 2010 32bit
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,716
    I'll take a look.
    Did you open the zip file and review documentation and database? It is based on the Bishop videos and shows how to manage user access to forms - which is the issue we were trying to resolve.
    Your feedback is requested.

  10. #25
    billgyrotech1 is offline Competent Performer
    Windows 10 Access 2010 64bit
    Join Date
    May 2019
    Posts
    179
    Yes thank you for the zip file. I have viewed some and it does make sense.

  11. #26
    June7's Avatar
    June7 is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,815
    If a user should not have access to a particular button, I use code that sets not visible. Or have 1 button and code behind that button opens appropriate form.

    I try to avoid creating multiple forms that are essentially duplicates. I would have code behind form that manipulates availability of controls depending on user permission. Depends how great form differences are.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  12. #27
    orange's Avatar
    orange is online now Moderator
    Windows 10 Access 2010 32bit
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,716
    I agree with June. You could:
    -make the relevant button invisible (so user is unaware of an option)
    -provide a message re insufficient security level to do XYZ.

    In my sample database(post#21), I chose to show a message. But you could easily modify the logic to make buttons or Forms invisible when security level is less than required to see a Form. The message approach was used to illustrate how to manage user access generally by means of an EmployeeType/Role and a Permissions level to Open specific Forms. It is not intended to be an application or final product. It was a restatement of the approach in the Steve Bishop video with an example to assist billgyrotech1.

Page 2 of 2 FirstFirst 12
Please reply to this thread with any new information or opinions.

Similar Threads

  1. How to get IDs For AFRs Table ?
    By billgyrotech1 in forum Access
    Replies: 7
    Last Post: 05-30-2019, 11:05 AM
  2. Related Tables, Form, Changes not successful
    By msto in forum Database Design
    Replies: 5
    Last Post: 04-25-2019, 02:06 PM
  3. Change password form in login system
    By Luke.F.14 in forum Access
    Replies: 3
    Last Post: 09-08-2017, 07:44 AM
  4. Execution Shuts on version change
    By drunkenneo in forum Access
    Replies: 2
    Last Post: 07-13-2015, 04:46 PM
  5. Replies: 17
    Last Post: 06-06-2013, 05:52 PM

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