Form Profile Instructions
Instructions for Setup
Again, be sure to watch the User Guide on the previous page for complete instructions. Here is a step-by-step list of written instructions if you prefer this to look back on. The time indexes for the User Guide video are shown.
(1:25) Copy all objects with names starting with Profile and Zoom (8 tables, 5 forms, 2 modules) to your database.
(2:30) Delete existing profile data by going to the ProfileEditorF and clicking on Delete Profile Data. Initial password is "599cd".
(3:59) Close the database and restart it.
(4:13) Open the Profile Editor. Open the Form combo box. On the Profile List Form add the names of each of the forms from your database that you want to create profiles for. Close the Profile List Form.
(5:18) On the Form Profiles Editor click Select Profile. Select "Normal Screen." Click Load Profile. You will be told the form does not exist in this profile. That's OK.
(6:01) Click Save Profile to save the current form (Main Menu) profile.
(7:00) Select the Customer Form from the Form combo box. Click Load Profile. The Customer Form will open. Again, this form's profile doesn't exist. Now click Save Profile. That will save the position and data for that form.
(7:30) Repeat this process for each form in your database for which you want to have a unique profile. You don't need to make profiles for every form in your database.
(9:07) Let's create a second profile. On the Profile Editor, click Edit List. This will open the Profile Form List. Create a new profile called "Green Version." Close the Profile Form List.
(9:29) Click the Select Profile button. Select the Green Version profile. You can either double-click on the list, or select it and click the Load Profile button. You are told that Main Menu doesn't not have a setting in this profile (Green Version). That's OK. Let's add one.
(9:49) Click on the Load / Save Design button on the Profile Editor Form.
Very important: DO NOT USE the normal Access methods to switch "Design View" to make changes to your form. You MUST use my Load / Save Design button EVERY time you want to load or save design changes.
(10:01) Make whatever design changes you want for your Green Version of the Main Menu.
(10:28) If you want to hide controls on a form, you can set their Visible property to No, but the controls themselves MUST exist on the form for every profile.
Very important: YOU CANNOT DELETE any controls. If you delete them from one profile, you delete them from ALL profiles. Likewise if you add a new control, you must specify its properties in ALL profiles.
(11:45) When you're done making design changes to the form, again click on my Load / Save Design button. It saves the changes to the profile tables. Click Load Profile, and the Main Menu will reopen in Form View.
(12:20) On the Profile Editor Form, use the Form Combo box to select the Customer Form, and click the Load Profile button. This will load the Customer Form. Again, profile does not exist.
(12:35) Click the Load / Save Design button. Make whatever design changes you want to the Customer Form.
(12:54) Click the Load / Save Design button again to save the profile changes.
(13:02) To open forms in your database, you MUST use my ProfileOpenForm command. You will find it in the ProfileModule. The syntax is exactly the same as for a regular DoCmd.OpenForm command.
Very important: you MUST open forms using ProfileOpenForm in order for them to load correctly. Go through your database and replace any DoCmd.OpenForm command with ProfileOpenForm for those forms you wish to have multiple profiles.
(14:49) Edit the design of the Main Menu. Click my Load / Save Design button. Change DoCmd.OpenForm to ProfileOpenForm in two places.
(15:31) Click on my Load / Save Design button to save changes. Close and reopen the Main Menu. Click on the buttoms to open them using the new method.
(16:01) Open the Customer List Form using the Button on the Main Menu. Notice how the Form combo on the Profile Editor changed the Customer List Form.
(16:22) Click Load / Save Design. Make design changes to Customer List Form. Click Load / Save Design to save.
(16:57) Edit the Double-Click event for the CustomerID textbox to change the DoCmd.OpenForm to ProfileOpenForm.
(19:06) Change the PROFILEAPPTITLE and PROFILEPASSWORD constants if you want to.
(20:00) If you want to include a "Profile Editor" button in your database, but password protect it, the code for that is in my database's Main Menu form, behind the "Profile Editor" button.
(21:14) Repeat the above steps to create a Red Version profile.
Very important: when you are making design changes, you can make controls not visible, but they must remain on the form AND in the same SECTION they belong in. Don't move them from the Details section to the Form Footer, for example.
(31:21) To setup Windows Shortcuts to open the database in different profiles, first open your ProfileT table and take note of the ProfileID values for your different profiles.
(31:44) On your Windows Desktop, right-click on your database ACCDB file and select Properties. Take note of the filename and path to that file. In my case it's C:\Users\amicr\Desktop\NewGuy.accdb.
(32:40) Create a shortcut to MSACCESS.EXE (with its full path) and add your database filename and the appopriate command line switch to change your ProfileID when the database loads. For example:
"C:\Program Files\Microsoft Office\root\Office16\MSACCESS.EXE" "C:\Users\amicr\Desktop\NewGuy.accdb" /cmd ProfileID=11
(34:14) Create different shortcuts to open different profiles as desired.
(34:36) Be sure to set my ProfileSelectorF as the Startup Form for your database. File > Options > Current Database > Display Form.
(35:28) Go into Design View of the ProfileSelectorF. Open up it's VBA source code. Change the STARTUPFORM constant to whatever form is the normal startup form for your database.
(35:52) If you don't specify a profile via command line switch, the profile marked Default in your ProfileT will open. If you don't have a Default profile selected, the Profile Selector will open and allow the user to choose which profile loads on startup.
Check out these other pages that may be of interest to you: