Different FE's for different users

A

ant1983

Hi,

Not sure if this is under the correct topic - If not, apologies...

My database (a BE and the copies of the FE on each user's computer) will
soon be live in my client's enviroment.

I would like to know the following:

I would like different FE's on certain user's machines - What is the best
way to do this.

Some context: I would like the director of the company to be able to have
access to all menu's and to be able to have unlimited restrictions in terms
of editing etc.

I would further like for the clerks to only have limited access and editing
restrictions.

How would i proceed with this?

Many thanks for assistance!!

Wayne
 
S

Steve

You could use a system of custom menus. Set the app to open to a menu that
only shows Company Director and Clerk. Set selecting Company Director to
open a password dialog where successfully entering the correct password
opens a full menu to the entire application. Limited access and editing
restrictions can be controlled with a custom menu that only opens certain
forms and reports in the database. So, set selecting Clerk in the main menu
to open a cusom menu that provides access to limited forms and reports.
 
K

Klatuu

Having identical forms with minor differences like that will create a
maintenance nightmare for you. Every time you have to modify it, you have to
do the same work twice. Never do that.

I use a method similar to what Steve describes. But rather than a login
password, I use the user's Network login. I have a table that has the user's
network login id, name, and access permissions.

Then in the Load event of each form, I enable or disable controls, tab
pages, etc to limit the user's permissons.

Here is an API call that will return the user's login ID. Create a new
standard module and paste the code into it by itself.

Private Declare Function GetUserNameA Lib "Advapi32" (ByVal strN As String,
ByRef intN As Long) As Long
Public Function GetUserID()

Dim Buffer As String * 20
Dim Length As Long
Dim lngresult As Long
Dim userid As String

Length = 20

lngresult = GetUserNameA(Buffer, Length)
If lngresult <> 0 Then
userid = Left(Buffer, Length - 1)
Else
userid = "xxxxxxx"
End If
GetUserID = userid

End Function
 
B

BruceM

When there is user-level security I have used group membership to show or
hide controls, etc. In a form's Load event I may have something such as:

If Not UserGroup("Admins") Then
Me.cmdSecurity.Visible = False
Else
Me.cmdSecurity.Visible = True
End If

The database uses a startup form that includes the command button
cmdSecurity, which opens a form that includes toolbars and other information
used to administer database security, but it could have been any form. The
users who are not a member of the Admins group don't see the command button.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top