599CD.com Access Calendar Updates   Collapse Menus
 
 
NEW Courses - Access Imaging, Excel 2007 Level 5 dismiss
 
   
 

What's New?  |  Courses  |  Theater  |  Demo  |  Tips  |  Blog  |  Forums  |  Search  |  Help  |  Order

 
What do you want to learn today? 
 
 

Microsoft Access Security Seminar
Proper Security for your Access Databases

 
This seminar will teach you how to properly secure your Microsoft Access databases. But that's not all. You will also learn how to build proper security into the workflow of your database so that you can control every aspect of a user's experience, and monitor their work as well in a database log.

You will learn how to properly secure your Access databases to control who can log in, who can edit data, and who can make changes to the database itself. But that's only the beginning. You will learn how to build a database where you can control every step in the "work flow" process of data entry, and create a system log so you can see who is doing what.

Click here for a video showing what's covered in this seminar:

AccessLearningZone.com
Click to Play - Seminar Preview
 
There are two more videos below showing
additional details. Scroll down to find them.

 


 

 
Seminars - Access Security
Description: Learn how to properly secure an Access database and control the "work flow" of information with user and group permissions.
Versions: I will use Access 2007, however the lessons are valid for all versions of Access back to AC2000. I will show any differences between 2007 and 2003. The lessons on the User-Level Security Wizard are specific to Access 2003.
Pre-Requisites: Access 101 - 104 a must
Access 201 - 207 highly recommended
Access 301 - 313 very helpful
Running Time: 7 hours, 4 minutes
Cost: $149

 

This seminar has several main goals. You will learn how to:

1. Create user and group security inside your database
2. Manage the "work flow" of your database
3. Control who has access to which database objects
4. Send email notices from inside your database
5. Create a detailed system log to track users
6. Encrypt and secure your database files
 

You will begin by creating a user information table (with username, password, and other data) and a secure logon form. This will allow us to control who can log on to the database.

 

Next we'll set up a Group form so we can assign users to different groups, like SalesRep, ServiceTech, Manager, Admin, etc.

 

In the next lesson, we'll define a "work flow" for our database. This will control how information is entered by our users. For example, our database will be for service work orders. Our work flow will consist of a sales rep entering a work order, a service technician performing the work, a manager reviewing the details, the sales rep follows up with the customer, and then the manager closes the work order.

 

You will be able to control which users will be able to enter data into which fields. For example, only service technicians can enter data into the "service performed" field, but not the "service requested" field, which is the job of the sales rep.

 

We will control each step of the work flow process with buttons that signify that a user is done with his work, and the work order is ready for the next person. Here you can see a "service call completed" button that will then send this work order to the manager for review. This work order will then be locked out so the service tech can't edit it any further.

 

 

You will learn how to send Email notices from inside the database when needed. This is great if you have employees that don't check the database all the time, so as to say, "your assistance is required."

 

The database will log every step in the work flow procedure. You will be able to see who did what, and when.

 

We will also create a system log table, so we can log everything that a user does: what time he logs on, what data he adds, what records he changes, etc. You name it, we can log it.

 

You will learn how to build your own internal database security. For example, do you want sales reps to be able to edit other sales reps' customers? Do you want service techs to be able to see customer data if they're not working on that customer's work order? Who can edit, delete, or add new customer records? What information should be required for new customers? Some of these are things you just can't do with standard Access User-Level Security.

 

You will be able to hide or show buttons and forms based on a user's security level. For example, the menu that a system administrator might see...

 

...will be completely different from what a simple service technician sees. This will help to control who can do what in your database.

 

We will spend a lot of time learning how to lock down your database and secure it from intruders. We will split the database into front-end and back-end files, encrypt the database with a password, turn off the Navigation Pane (database window) to keep people from poking around in your objects, set a Startup Form, and disable the Bypass Key so people can't go to the Navigation Pane directly when the database starts up.

 

You will learn how to dynamically link to tables in your back-end database using VBA code to overcome some security problems.

 

We will encrypt the front-end database into an ACCDE file (MDE file for older versions of Access). This will effectively secure the form, report, and module design capabilities and prevent people from viewing your database in design mode.

 

For our Access 2003 users, we will spend some time going over the User Level Security Wizard. This wizard will secure an Access 2003 database and provide "OK" security if all you want is to keep Joe from Accounting from poking around in form design, and seeing data he's not supposed to. It's not hack-proof, however, but it does provide "quick and dirty" security in a pinch. We'll set up users, passwords, groups, and permissions.

 

We will encrypt the front-end database into an ACCDE file (MDE file for older versions of Access). This will effectively secure the form, report, and module design capabilities and prevent people from viewing your database in design mode.

 

 

This seminar is perfect for anyone who wants to learn how to secure an Access database, prevent someone else from accessing parts of the database they shouldn't, assign permissions so you can control who does what, and create a work flow strategy in your database.

This seminar is long (over seven hours) but it's broken up into easily managed lessons of about 10 minutes each. You can sit down, watch a lesson, review the material, test the code out yourself, and experiment. Do a little bit each day. It's long, but it's comprehensive - you won't miss a single step as I've recorded everything from start to finish.

Click here for another video showing my step-by-step lesson plan guide to what's covered in each lesson of this seminar in detail.

AccessLearningZone.com
Click to Play - Step-By-Step Lesson Plan


Click here for a video walk-thru of exactly what this database does, and see how the flow of information going into the database can be tightly controlled from sales rep to service tech to manager.

AccessLearningZone.com
Click to Play - Database Walkthru

 

All of the sample database files for this seminar are available on my Web site (instructions on where to download them are in the course videos). They are available in Access 2007 and 2000 formats.

This seminar is available to view online in the Amicron Theater. You can click here to watch the first lesson absolutely free.

Of course, if you have any questions about whether or not this seminar is for you, please contact me.
 

 

Access Security Seminar Outline

00. Introduction (8:00)

01. Database Setup, Login Form (12:23)
Create a New Database
Trusted Locations
Set Overlapping Windows
Setup UserT Table
Access User Level Security
Why ULS is Not Very Secure
"Good Enough" Security
Create Login Form
Popup & Modal Forms

02. Login Form Code (11:42)
Docmd.Quit
Check for blank username/password
DLOOKUP Username and Password
NZ Function

03. Main Menu (9:43)
Exit Database Button
UserID, Username Fields on Main Menu

04. User Groups (14:35)
GroupT Table
Group to User Cross Reference Table
Junction Table
UserF Form
GroupF Subform
Adding Users to Groups

05. Checking Group Permissions (12:35)
Open User Form Button
Code to Check if User in Group
Is the User an Admin
Defining Your Own Function
Public Function
Return a Boolean
Global Modules

06. Service Process (9:06)
Define Service Processes
Create CustomerT Table
CustomerF Form
StatusT Track Work Order Status
ServiceT Detail on Service Call

07. Service Form (10:40)
Build Service Form
Create Combo Boxes

08. Service Listbox (11:23)
Listbox Service for Current Customer
OnCurrent Event
Modify SQL for Listbox to Format
Format Function in SQL

09. Sales Rep Security 1 (10:51)
Security: Who can Browse Customers
Assigning Customers to Sales Reps
Query to Show Only Sales Reps
Sales Rep Combo Box for Customers

10. Sales Rep Security 2 (10:43)
AllowAdditions, AllowDeletions, AllowEdits
Setting Properties in VB Code
Change Properties Based on User Group
Change Properties Based on SalesRepID

11. Locking Fields on Form (8:56)
Locking All Fields on a Form
For Each Control Loop
RGB Color Function

12. Unlocking Needed Fields (7:08)
Unlock Fields for Sales Reps
Unlock Fields for Service Techs

13. Create Service Order 1 (10:08)
Create New Service Order Button
Enable/Disable the Button
Get Default Value from Another Form

14. Create Service Order 2 (14:01)
Requery Service Listbox OnGotFocus
Open a Specific Service Order
Set a Default Sales Rep
Security Opening Service Orders

15. Assign to Service Tech (10:27)
MsgBox vbYesNoCancel
Lock Fields Once Assigned to Tech

16. Unassigned Service List (12:47)
UnassignedServiceQ Query
service List Form

17. Accepting Service Call (7:33)
Accept Service Call Button
Perform Service

18. Unassigned or My Calls (7:58)
Show Unassigned Service Calls
Show My Service Calls Button
Show ALL Service Calls
Dynamic SQL in RowSource of ListBox

19. Service Completed (11:32)
Mark Service Completed
Show Status on Service List
Show New, Open Service Calls

20. Hide Buttons on Main Menu (14:30)
Show/Hide User Form Button
Show/Hide Browse Customers Button
Open Service List Show Different Things
Private v. Public Form Functions

21. Fixing Some Problems (8:01)
Fix Problem with Sales Reps
Fix Missing Button Problem
Force Service Details to be Entered

22. Manager Review (12:29)
Manager Review 1 Button
Show Service Calls to be Reviewed
Assign For Followup Button
Hiding All Buttons on ServiceF

23. Followup, Closing Call (11:38)
Sales Rep Followup Completed Button
Manager Closed Button

24. Sending Email Notices (13:00)
Sending Email using Microsoft Outlook
Docmd.SendObject

25. Admin User Combo (11:51)
Make the UserID a Combo Box
Quick Change to Another User

26. Locking the Database 1 (9:43)
Split the Database
Front End v. Back End Databases
Encrypt Database with Password
Open Exclusive
Linked Table Manager
Get External Data
Create Links to Backend Tables

27. Locking the Database 2 (13:28)
Backup Your Database
Turn off Navigation Pane
Turn off Database Window
Show Startup Form - LoginF
Application Title
Display Navigation Pane
Allow Full Menus
Allow Shortcut Menus
Hold SHIFT Key to Bypass Security
VBA Code to Shut Off Bypass Key
AllowBypassKey
Database CreateProperty
Properties Collection

28. Locking the Database 3 (10:09)
Import Linked Tables Bypasses Security
Create Admin Menu

29. Locking the Database 4 (13:55)
Global Const
Dynamically Link to Tables
Destroy Links to Tables

30. Locking the Database 5 (14:45)
Create a Recordset
OpenDatabase
OpenRecordset
Read User Info Before Linking Tables

31. Locking the Database 6 (17:09)
OnClose Event
Terminate Table Links
The Navigation Pane Shows
The Database Window Shows
Link Tables using TableDefs

32. Creating an ACCDE File (9:11)
Make ACCDE File
Make MDB File
Source Code (Design) is Gone
VB Debug Compile to Find Errors

33. AC2003 User Level Security 1 (10:36)
User Level Security Wizard Part 1

34. AC2003 User Level Security 2 (12:43)
User Level Security Wizard Part 2
Create a Workgroup File
Securing Objects
Selecting Security Groups
Creating User Accounts
Creating an Unencrypted Backup
Logging on with User Permissions
User and Group Permissions
Add or Delete Users
Add or Delete User Permissions

35. Other Database Properties (8:40)
Show All Database Security Properties
VBA Code to Change Properties
StartupShowDBWindow
StartupShowStatusBar
AllowBuiltinToolbars
AllowFullMenus
AllowShortcutMenus
AllowDefaultShortcutMenus
AllowToolBarChanges
AllowBreakIntoCode
AllowSpecialKeys
AllowBypassKey

36. Database Log (17:02)
Track Employees with a Database Log
Create LogT Table
Create LogIt Function
Track User Logons
Track Data Changes
OldValue Property

37. Review (2:59)
Review Topics



MAIN CONCEPTS COVERED

Creating your own security inside the database
- Making a user table
- Logon form
- User groups with permissions

Controlling the "work flow" in your database
- Sales rep enters a work order
- Service tech performs the work
- Manager approves it
- Sales rep follows up
- Control who can enter data into what fields
- Buttons to move to the next step in the process
- Locking access to data once that step is completed
- Sending an Email notice with Outlook for the "next step"
- Creating a system log to watch everything your users do

Determining which users can access what forms, fields, data
- Sales reps can't edit each others customers
- Service techs can't see customer data
- Users can't bypass the "work flow"
- Managers can edit everything
- Admins can supervise and change access rights
- Who can browse customers?
- Who can see service reports?
- Showing or hiding buttons/forms based on access rights
- Preventing record edits, deletions, or additions
- Forcing users to enter required data

Properly Securing Your Database
- Split the database into Front-End and Back-End files
- Encrypt Back-End database with a password
- Turn off Navigation Pane, full menus, toolbars, etc.
- Disable the Bypass Key for startups
- Dynamically link to tables using VBA code on database startup
- Destroy those links when database closes
- Compile your database into an ACCDE (MDE) file
- Access 2003 User Level Security Wizard
- Working with Access 2003 users, groups, and permissions
- Advanced database properties in VBA such as AllowBreakIntoCode

Programming Topics
- Using DLOOKUP to lookup usernames & passwords
- Many-to-many relationships with junction tables (users/groups)
- Locking fields on a form based on user rights
- For Each control loops
- Creating your own global modules with public functions
- Dynamic SQL rowsource for listboxes
- AfterUpdate, OnCurrent, OnGotFocus events
- Use the RGB function to set color in VBA
- Getting a value from a form using Forms!Formname!Field notation
- Create and edit databases in VBA
- Define global constants
- Create and work with RecordSets to read user info
- Use a recordset to read from an external database with a password

 


 

 

Huge Discounts Available
When you purchase multiple classes together
Huge savings up to 50% off! Order Now.
 

Student Interaction: Access Database Security Seminar

Richard on 1/1/2009:  Learn how to properly secure your Access databases. Control and monitor everything your users can do in the database. Manage the complete flow of data into your database. - 1. Preview of topics covered - 2. A step-by-step Lesson Plan - 3. Complete Walk Thru of the completed database
 David Sterner on 11/3/2009: In Access 2007 when creating a list or combo box you can select the sorting order as part of the wizard. In 2003 what is the easiest way - write code in the row source?
Richard Rost on 11/6/2009: David, in 2003 and earlier, the EASIEST way to sort a combo box is to make a QUERY that's sorted, and then base the combo box on the QUERY. Otherwise you have to manually add the "ORDER BY" clause to the SQL (or invoke the query builder inside the combo box, which is a pain too).
 David Sterner on 11/18/2009: Hi Richard: For lesson 24 I want send an e-mail notice and I want to cc two individuals also so I created string variables E, CC1 and CC2. Access help says that CC1 and CC2 should be separated with a ";". But I get an expected: end of statement error. Is there a different separator I should use?
Richard Rost on 11/19/2009: Hmmm... interesting. Have you tried just a comma?
Dave Sterner on 11/20/2009: No a comma doesn't work - doesn't that just set it to the next property to the right?
Richard Rost on 11/20/2009: If you want two CC addresses, then they should both be inside the same string. For example: "sendtoAddress@somewhere.com", "cc1Address@xyz.com;cc2Address@abc.com", "bccAddress@amicron.com" Keep in mind, however, that multiple addresses like this INSIDE a string might cause Outlook to open the SendTo window and cause you to hit Send. Minor inconvenience.
Dave Sterner on 11/20/2009: Got it, thanks.
 Monty on 12/18/2009: On lesson 26 in Access Database Security Seminar, when I click on my database and then hold the shift key down and then double click back on it, it doesn't bypass the startup options. I have Access 2007 version. This is a good thing I guess. I just thought to mention it to see if it's happened to anyone else.
Paula Stroud on 1/6/2010: Richard, at Time Index of 4:30. It appears an "End If" is missing. Unless I missed it. There are 2 places it could go ... at the end of the If Msgbox() statement, or at the end of the Sub. Doesn't work at the end of the Sub.
Robert Fleming on 1/26/2010: How do I get the main menu to open and only show to buttons that the logon user is allowed to see. It appears that any buttons that are hidden does not appear on the main menu, regardless of the sign in group that you are in, in order to get the proper main menu you need to hit the refresh button


Reply from Richard Rost:

Robert, if this is the case, something's not right with your code. The OnOpen event for your form (or the code in your button - whichever way you chose to do it) should hide/show the proper buttons depending on the security you have set up. Recheck your code.
 David on 2/9/2010: Richard, Good course I really enjoyed it and learned alot. I would like to see a followup course on how to change the color of the buttons on the main menu when the status changes. Thanks


Reply from Richard Rost:

David, changing the foreground color of a button is something that Access doesn't do well. You can change the FONT (text) color, or use an ActiveX button control (which I don't recommend). Personally what I do is put little red rectangle controls around, but behind my buttons. Then, if I want to highlight a button, I just make that rectangle visible and it highlights the button. If you really want to see how to do this, let me know.
David on 2/9/2010: Richard, I inserted the following line of code at the end docmd.close acform, "LoginF" Endif DoCmd.RunCommand acCmdWindowHide End Sub It hides the navigation pane. My question is will it effect anything anywhere else? Ref: Video 31 Time 10:50


Reply from Richard Rost:

Well, that should work OK as far as I can see. You don't need to have the navigation pane visible for the database to work (and as you've seen in the seminar, I don't leave it open for my end-users). Bottom line: try it and see. :)
 David on 2/11/2010: Richard, What are the limits if any if some users are still using Access2003 and others are using Access 2007 for the same database?


Reply from Richard Rost:

You're going to have to keep the database in the Access 2003 (MDB) format in order to use the same file with both sets of users, so people using Access 2007 won't be able to have any of the new features available in 2007. The exception would be if you have a SPLIT database and you keep the tables in an MDB file, but upgrade the Access 2007 front-end to an ACCDB file for just those users. I don't recommend this, however, because then you have to support two different database files.
David on 2/11/2010: Richard, In the process of trying to figure out my last post (MS 2003 Vs MS2007), I changed the encrypted Service.accde to a .mdb, and I noticed the tables could be imported into a blank database. However the forms & modules were shadowed out. Is there anyway around this or is this another limitation to MS Access? And for my previous post... I think I should have saved the Service.accdb file to Access 2003 first before encrypting the database in 2007. When trying to open the database in 2003 the MainMenuF only shows the service and exit buttons aftering logon. The table defs were not linked. Please advise because my users use both 2003 and 2007.


Reply from Richard Rost:

Once you ENCRYPT your database file (make an MDE or ACCDE) you effectively LOCK the forms, reports, macros, and modules. This is designed so you can give your database to others and not risk them getting hold of your "design" code. You'll need to use your original ACCDB or MDB file.
 Dave Sterner on 2/11/2010: Richard: I keep going back and trying things with this fantastic seminar. One thing that I was going to mention that I thought was missing was a menu button to allow the current user to change his/her password, username and e-mail address. So I decided to design one myself using a form based on a query of the UserT with CurrentID () as a criterion. However, I realized it would be nice to have an exit button where you can ask the user if they want to save their changes upon exiting the form. My question is: what if they don't want to same their changes? I don't know how to recover the previous data once they have changed the record. Is this possible? Thanks


Reply from Richard Rost:

It's possible, but it's a bit of a pain. You would need to make your own "close" button because otherwise whenever a user moves to a different record or closes a form, Access saves the data to the table. In your close button, ask the user if they're sure they want to save changes. If so, just close the form. If they say NO, then you can invoke the Me.Undo method which cancels any updates they've made (while the current record is still dirty).
 David on 2/12/2010: Richard, I have several like odbc database and want to link to each using the same forms. Can I'm trying to change on the fly the linked odbc tables in the same manner as the describe in the course. However I'm not seeing the linked odbc tables after the split. Any suggestions?


Reply from Richard Rost:

Dynamically linking to external ODBC sources requires some additional programming. I don't know the code off-hand, but when I get some time I'll try to find it for you. If you're in a hurry, try a Google search. It's not terribly complicated, but you have to do it right for it to work.
Robert Fleming on 2/23/2010: Your answer of 2/9/10 is bending the truth. It is nice to say that your copy of the database works find. But in fact if you look at your database after completion of lesson 20 it does not work. You had to stand on your head and spit nickels to get the code to work properly in Lesson 25. A decent answer would have been that after completion of lesson 25 the code problems are repaired. You know Richard when I ask a question I would appreciate an honest answer not a brush off one. Am I asking for too much?


Reply from Richard Rost:

Robert, you are absolutely correct. Perhaps I didn't completely understand your question the first time. I apologize. It's not that I was trying to brush you off. I didn't realize that you were inquiring about a problem that I fixed in a later lesson. That's my mistake. I would say that 95% of the time, the problems that my students have with their databases are because they didn't type something in correctly or follow a procedure exactly as I demonstrated. I prematurely jumped to that conclusion with your question. I'm sorry. Sometimes after spending three or four hours answering questions, I have a tendency to jump to the "it's the student's mistake" answer. Instead of taking the time to fully refresh my memory on that lesson (which I should have) I gave you the EASY (for me) advice to just recheck your code. I know that the database worked perfectly for me AT THE END OF CLASS, but yes, there are often those little problems that creep in that I fix from lesson to lesson. I didn't realize at the time, that that was what you were asking about. Again, my sincere apologies. Now, with all of that aside (and me feeling like a jerk) that's one of the reasons I try to remember to say at the beginning of ALL of my Access classes that you should watch ALL of the lessons through once before building anything. This way you can see the direction that the course is going to go in, and what will be covered. You'll see where there are going to be problems before you try to build the database yourself. In fact, one of the guys who writes my handbooks for me has yelled at me SEVERAL times. "I'm gonna kill you, Rick!" he said the one time because in one of my lessons I spent 15 minutes building something and then said, "and that's how you DON'T want to do it." I then proceeded to show the right way... but he already typed all that up (and usually in the handbooks I tell the guys not to bother showing the WRONG solutions). I feel that showing mistakes is VERY important for learning how to build databases, but you don't necessarily need to make those mistakes yourself in order to know what to avoid. You don't need to catch a disease to know it's bad, right? :) Anyhow, again, I'm very sorry for the brevity of my previous answer. Had I realized what your question was about, and remembered that this was a problem I later solved, I would have given you an even SHORTER response the first time: "Keep watching the lessons." :)
 Dave Sterner on 2/23/2010: Regarding the Me.Undo to revert back to the original record entry, what if you are working with a subform in a form. How do you undo the record of the subform?


Reply from Richard Rost:

Me is just a reference to the current form, so if your FOCUS is currently IN the subform, you would still say: Me.Undo. If you're in the PARENT form and you want to cancel the editing of the record in the subform, you could say: MySubform.Form.Undo However, as soon as you leave the record in the subform and click on the parent form, the data is saved, so you can't use this method. It would only work if you were programmatically modifying the data in the subform from VBA code in the parent. Make sense? Remember, you can also refer to forms by their FULL names: One form: Forms!FormName!FieldName Subforms: Forms!ParentForm!SubForm.Form!FieldName To access their Undo methods: One form: Forms!FormName.Undo Subforms: Forms!ParentForm!SubForm.Form.Undo
 
 

You may want to read these articles from the 599CD Blog:

 

 

Need Help
 
Do you have questions about Word, Excel, Access, Web Design, or computers in general? Just ask us anything you'd like. Click here for assistance.
 

Get Free Tips & Tricks
 

Join our mailing list today and get information on our Free Tips & Tricks Newsletter including free video tutorials, eBooks, live seminars, and more.

Email:
Name:
Type in the word to the left:
 
Your email will be kept 100% safe and will never be given to 3rd parties.
 


CLICK HERE for a FREE lesson



Order your first 599CD course now.
Your Satisfaction is Guaranteed!


Subscribe to our RSS FeedWhat's This?

599CD on Facebook  599CD on Twitter  Subscribe to RSS Feed  Add to Live Bookmarks  Add to My AOL  Add to MyYahoo  Add to Google Reader or Homepage    hide help

599CD Home   |   Learn More   |   What's New?   |   Contact Us   |   Free Demo   |   FAQs   |   Order Now   |   Affiliate Program   |   TechHelp   |   MYOLP   |   Jobs   |   Downloads   |   Handbooks  (Text)   |    Mailing List   |   Lost Passwords   |   Referral Program   |   Online Poll   |   Corporate, Educational, Government, Non-Profit Sales   |   Message Forums   |   Testimonials   |   Privacy Policy   |   Free Gift CDs   |   Tips & Tricks