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.
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.
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?
I have to leave for the evening and will check back in the morning thank you very much for your help.
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.
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
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.
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?
I see a problem with my approach. I want the main form to always be there in another tab.
What did I do wrong?
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.
Yes thank you for the zip file. I have viewed some and it does make sense.
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.
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.