Create a Password Form

hullstorage

Registered User.
Local time
Today, 14:37
Joined
Jul 18, 2007
Messages
213
Hi all,

I am trying to create a form with a password protected screen which has my companies logo on it:

Basically i have created a form called password with two fields and a logo
which starts up when database is run.

From this i want it to do the following:
Username=John
Password=( Parcels1 )
On completion of password then start form Main
If incorrect warn them of this and shutdown database

Many thanks in advance
 
Hi,

you can do something simple such as creating a command buttom and put the following code on the OnClick event:

Code:
 if usernamefieldname = "John" And passwordfieldname = "parcels1" Then
DoCmd.OpenForm "formname"
Else
'your alternative code goes here such as a msgbox or quitting access
End If

However, there are also better approaches, such as storing your usernames/passwords in a table in your database.

So please note, that the example above is very simple to break it and still gain access to your database.
 

Users who are viewing this thread

Back
Top Bottom