How to Password Protect a Form or Report in Microsoft Access

How to Password Protect a Form or Report in Access

by Shane Zentz
Microsoft makes doing a lot of things with databases very easy. And password protecting a form or report is no exception. With just a few lines of code in the right place you can prevent unwanted users from opening and viewing or editing data in your form or report. Just as an aside, this is not the most secure method and in fact is not really secure at all. But in order for someone to find the password (which is hard-coded into the application) they would have to have at least basic knowledge of access from the design and programming point of view, so if they are just users then chances are that they will never discover the password (by looking at the code behind the program) unless someone tells it to them or they discover it written down somewhere. Having said that, this method is still pretty useful for just average applications, like I said it is not really the most secure method, so if your application contains really sensitive data (like social security numbers or bank account numbers) then I would advise using another more secure method. But if you just need a basic password protection to protect just one or a few forms from average users then this method will work and it is also quick and very easy. So read on to see how this is done.

Open the form or report that you want to password protect in design view and find ‘form’ in the properties field (see photo 1). Then switch to the events tab. Under the events tab you will see a field called ‘on load’ (see photo 1), this is the field that controls what the form or report does when it is first loaded or opened. Here we want to add some code to the on load event so that it will first prompt the user for a password. So click on the tiny icon with the three little dots on it and on the window that pops up, select ‘code builder’. This will bring up a Visual Basic window (see photo 2) which will have a method for the ‘onload’ event preloaded. All we need to do is to add the code to this section.

 

Here is the code:
Dim PassWord As String

PassWord = InputBox(“Enter Password”)

If PassWord = “whatever password you choose here” Then’

Open FormDoCmd.OpenForm “name of the form that you want to password protect”
ElseMsgBox (“Wrong Password?”)

DoCmd.Close acForm, Me.NameEnd If

Save the code and exit and also save the changes to the form. Now try to open the form and you will get a password box before the form will open. If you enter the correct password then it will open, otherwise it will not. Another thing I should mention is that the text for the password is not dotted out or starred out like is usually is with password protection forms. I think that this can be changed but that is beyond the scope of this tutorial.
This code is pretty basic. To use this you will need to change the line that says “whatever password you choose here” to whatever you want the password to be. And then change the “name of the form that you want to password protect” to the name of your form. Now, you can change “Enter Password” to whatever message you want to appear when the password box comes up, and likewise, you can change the “Wrong Password?” part to whatever message that you want to display when the user enters the wrong password or does not enter any password at all.
So there you have it, a pretty easy and basic password protection system to password protect a form or report in Microsoft access. This will work with just about any version of Access, so give it a try. Just remember that this is not really completely secure becuase anyone who knows how can just look at the form in design view and then check the ‘onload’ event code to discover the hard-coded password, but the average user will never know how to do this anyway, so this is a reasonably decent solution.
Thanks for reading this tutorial on password protecting a form or report in a microsoft access database.

How to Create a Basic 'TEST' Database in Access

Create a basic test database in access 2010:
This tutorial covers how to create a ‘test’ database in Access 2010. You might say, why create a test database? Well, the answer is that sometimes it is much easier to start with a simple database with only a few tables and forms to see how your project will work when it is scaled to a much larger level. The main reason is simplicity and testing. Testing and coding is always much easier when working on a smaller scale. If you are familiar with programming then you know that it is easier to code one small module (or function, or method) at a time instead of trying to write the whole program line by line. It is the same principle here. So if you have a project to do in access, whether large or small, hard or easy, for work or school, then this tutorial will show you how to quickly set up a test database in Access 2010.

Let’s say, just for an example, that your project involves a large amount of data and data sets, but you are currently stuck on a certain relationship between two tables or a design problem between two tables or a programming issue between two tables. Then instead of working with a large set of data and tables (and queries, relationships, modules, ect.) it may be easier to just create two example tables that are at least similar to the ones that you are currently stuck on, and then add a little bit of test data just to work with. This should be easier than working within your complex project and then when you have the problem solved or have a worked out solution, it will be much easier to just import that solution into your project.
So for this lets assume that you are stuck on some problem that exists between one table which contains customer data and another table which contains data for a business. In this scenario, I would create a simple access test database with only two tables. The tables will be called ‘customer’ and ‘business’ to keep it pretty simple. And the tables will have the expected data fields to go with them as well. So the first step is to open access and create the two tables:

And add all the necessary fields, but remember that this is just a test so there is no need to add each and every field, we just want some example data to work with and we still want to keep it pretty simple to make it easier to work with.

Then, once you have the two tables and the data fields that correspond to those tables, now it is time to add some ‘test’ data. Just make up a few customers and a few businesses, in this case. Now we have our test database set up and we are ready to solve our problem.
Is it a relationship problem?

Is it a design problem?

Is it a module/coding problem?

As you can see it is sometimes easier and beneficial to just create a simple test database to solve a problem that would be more difficult to solve on a larger scale, then import the solution into the more complex project. So I hope that this advice will help with your next access database project or assignment.

Thanks for reading this post!

Shane Zentz

Mass Submit URLs to Search Engines and Directorys

Some excellent resources for webmasters to mass submit websites to search engines and directorys…..

Whether you are a seasoned web developer or a noob, you realize that the most important thing for your website is traffic. Whether it is a personal website just for fun or a business website for an important client, either way traffic is a necessary ingredient. Because no matter how good your website looks, no matter how correct the code is, if nobody sees it then what is the point? So most people realize that the key to getting traffic is to rank very high on at least a few keyword searches. But this is not easy to do. First you need to at least get listed on the search engines. That is where this article comes in. This article provides a few links that will add your website to a butt-load of search engines and it is completely free and only takes a few minutes. Now, I am not saying that you will get a flood of traffic from this, but it will get your website listed on many search engines and may generate ‘some’ traffic to your website. In other words, this should be considered only a start. You will still need to do the traditional link building and other seo activities to generate a lot of traffic. But it is a start.
So here you go:

Here is one of the best mass url submit that I have found: http://usertown.de/submit/

And here is another really good url mass submission websites: http://x10submit.com/

And finally, here is another really good mass url submission website: http://www.submitexpress.com/free-submission.html

If you know of any other url mass submit websites, or even of any mass url submission software, then feel free to add the link to the comments.
Thanks for reading this webmaster article and I hope it helps you to generate more traffic.
Shane Zentz

How to Create a Switchboard (or Splash) Screen in Access 2010 by Shane Zentz

When creating a database application in Access 2010, you will sometimes come accross a situation where you will want to present several options to the end-user to choose from. For example you may have one form for data entry and one report, or you may have several forms and reports. This is where the idea of the ‘switchboard’ or ‘splash screen’ comes in. This handy switchboard can be used to present several choices for the end user to choose from. So this is what this tutorial is all about. And this is only the first part. In this part we will create the switchboard or splash screen (which will display as a pop up window when the user opens the database file), but in the next part of this we will fill the switchboard with photos and clickable (usable) buttons which will open forms and reports. So open up Access 2010 and get ready to create a switchboard!

The first step is simple. Just create a new form in design view. Resize the area to your liking and then click on the ‘other’ tab in the form’s properties. Change where it says ‘pop up’ from no to yes. Now switch to the format tab of the form’s properties. On this tab you will want to change ‘record selectors’ and ‘navagation buttons’ to NO and also set ‘control box’ and ‘close button’ to NO, and finally set min and max buttons to ‘NONE’. Now save your form and switch to display view. You should just see an empty window with no record selectors and no min,max,or close buttons, just like this:

OK, if you have something that looks like that then you are on your way. So close this switchboard out (right click somewhere in the popup window and select close). Now lets make this switchboard open automatically when this database is opened. To do that just go to the File tab and from there select the options tab towards the bottom, which will open up the database’s properties window, like this:

On the “current database” tab, you can set the title for the switchboard and even select an icon for the database itself. Just below those options is the one that will open the form when the database is opened. It says “Display Form” and you can select any form that you created in your database. The form that you select will open automatically when the database is opened. So choose the form that you just created, pick a title for it, then save these settings.

 

Close the database and reopen it. And when you do you should see the (blank) switchboard that we created earlier.

Not much here, just an empty window, but you can add whatever title you want and whatever graphics or photos to the background, and of course buttons to open forms or data entry. So this is just the starting point. Check the Switchboard’s properties add photos and other funcionalities to it.

Just be aware that you can even set this switchboard to open after a certain interval (or close after a certain interval) with some of the forms properties. But that is a little beyond this tutorial, but if you are interested in this just google it man.

O.k., next we will add some real functionability to this switchboard and even decorate it a little to make it look even nicer. So check back for part two of this tutorial.
Thanks for reading this blog!

Shane

Resize a Batch of Photos using Photoshop

Welcome,
If your camera is anything like mine, a Sony DSC-W330, it takes great pictures but the size is way too big. And if you need to resize your photos to post on the internet or to be able to more easily send them in an email, then you know that it can take a long time to resize the photos. And it is even worse if you have a large batch of photos. Well there is a ‘batch photo resize’ function built into photoshop which makes this previously time consuming process way easier and way faster. I have to say that this process works perfectly with my sony camera which normally takes pictures at 4320 x 3240 pixels, way too large for most applications. When I use the function in photoshop that I am going to describe it only takes a few minutes (or even a few seconds) depending on the number of images in the batch. And I usually resize the images to 800 x 600 pixels. This used to take me a ton of time, but then I discovered this photoshop shortcut to resize a whole batch of photos. But the best part is that it requires no user interaction, it is completely automatic. The one thing that I should mention is that I don’t think that this will work very well with a folder (or batch) of images of different sizes, but you could try it and see, because you never know, it just may work!
So, you have a batch of photos (a folder of equally sized photos from your digital camera), and you need to resize all of them, and you want a fast way of doing it? You don’t want to spend a few hours resizing them one by one? Then Photoshop to the rescue! Here is how to resize a batch of photos using photoshop.
The first step is to get all the photos you are going to resize into one folder, and like I said earlier it is best that they are all the same size. Next, open photoshop. Now go to: file and scroll down and select the ‘scripts’ sub-menu and then select “Image Processor”.

photoshop menu-1024x768

photoshop menu-

 

 

 

 

 

 

 

 

 

A new window will open with all the options you will need to resize your batch of photos.

Photoshop Batch Resize

Photoshop Batch Resize

 

Under the first section, click on the ‘select folder’ button and find the folder of photos you need resized. Then, choose where you want the photos saved, if in the same location then select that or if in another location, then browse to that location. Now the third option is where you select save as jpeg (usually what you will need), and then the box next to it ‘resize to fit’ and the default is 800 x 600, normally a pretty good size for email and the internet. Once your settings are correct, click on run and sit back and enjoy. All you will see is the photoshop checkerboard background changing sizes for each photo in your batch, and this will be pretty fast if you only have a few photos but will take a while if you have a large number of photos. But it is completely automatic. When the show is over, navigate over to the folder you selected to save the photos in and you should see a new folder (within that folder) named ‘jpeg’ in that you will have your resized photos (and your original photos should be still intact).

How cool was that? I cannot believe how much time I wasted by resizing each image seperately. This cool photoshop function has saved me a ton of time, and hopefully it will save you time as well.
Thanks for reading this photoshop tutorial.Shane Zentz