Does this make sense? (1 Viewer)

Officeboy

Registered User.
Local time
Today, 03:47
Joined
Nov 10, 2009
Messages
66
Hey, I'm trying to create a Login for my database. I have 3 "ranks" in a table. Admin, Editor, and Sale.

I'm designing a home "form" for each of them (dont tell me to do the swichboards, i'm just being difficult and I JUST got the forms finished)

When you put in the 2 txt boxes at "login" Username and password (they are not refrenced to anything) I wrote a simple VB macro to select wich "Start Page" to open

Private Sub Login_Click()
if
frmLogin.Login = tblemployee.EmployeeID And frmLogin.Password = tblemployee.Password And frmLogin.Editor
open frmInput

elseif
frmLogin.Login = tblemployee.EmployeeID And tfrmLogin.Password = tblemployee.Password And frmLogin.Editorthen
open frmAdmin

elseif
frmLogin.Login = tblemployee.EmployeeID And frmLogin.Password = tblemployee.Password And frmLogin.Editor
then open frmSales
End sub

........................

I'm wayyyy off arent I?

LOL Let me know how I can fix this please, I appreciate it!
 

Atomic Shrimp

Humanoid lifeform
Local time
Today, 11:47
Joined
Jun 16, 2000
Messages
1,954
You need Docmd.OpenForm, I think.

And probably Select Case instead of a series of sequential IFs

And are the forms really so different from each other? If not, I would suggest designing a single form and locking, hiding or disabling the components and functions that the lower-rank users should not be able to use, as appropriate
 

JohnLee

Registered User.
Local time
Today, 03:47
Joined
Mar 8, 2007
Messages
692
You could have saved yourself a lot of unneccessary work if you had used the Security feature within Access.

From the "Tools" menu, select "Security" and you will find those below:

User and Group Permissions

User and Group Accounts

User-Level Security Wizard

You would need to read up on this, you should have completed all aspects of design and development of your database, once you are 100% sure that all this type of work is completed then you should set up your security as the last aspect before deploying your database, you should also ensure you have a copy of your database before setting up the security aspect, should you need to introduce a upgraded or amended version.

Good luck.

John
 

Users who are viewing this thread

Top Bottom