Fluent UI - Differentiate on login? (1 Viewer)

Crappy

New member
Local time
Today, 09:41
Joined
Mar 12, 2012
Messages
2
I have a 2007 database with a custom Fluent UI design. I also have a login form wich opens every time I start the database. What I would like to do is to have a different UI interface load dependant on which peron who logs in.

I have now made a USysRibbons table wich consist of three fields; ID (Autonumber), RibbonName (name of ribbon) and RibbonXml (the fluent UI code).

I have made three entries;
The first is name 'HideData', wich hides everything on the UI. This is default on start-up.
The second is named 'User', and have all the UI that a user needs.
The third is names 'Admin', and have all the user UI pluss a admin tab group.

My question is; is it possible to start up th different UI's based on who log-in. Or can the fluent UI only load on Access start up?
 

MarkK

bit cruncher
Local time
Today, 01:41
Joined
Mar 17, 2004
Messages
8,178
Almost all the ribbon controls, including tabs and groups, have a getVisible callback. This allows you to show or hide major ribbon components pretty much at will. You need to keep a reference to the ribbon object by using the onLoad callback, and then you call that ribbon's Invalidate method, which forces it to redraw itself, which runs your getVisible code.
 

bluetongue

Registered User.
Local time
Today, 19:41
Joined
Jul 15, 2004
Messages
34
I have used this code to restrict the functions users can perform:

I have a table (tblUser) - if the user's ID is in the table they are able to edit data otherwise they can only view.
The code is on the load event of the startup form and is only sufficient to keep out users with minimal Access experience. It may help point you in the right direction.

Private Sub Form_Load()
Dim strUser As String
Dim strLegit As String

On Error Resume Next

strUser = Environ("username")

strLegit = DLookup("[userName]", "tblUser", "[userName] = '" & strUser & "'")

If strLegit = "" Then
Me.AllowAdditions = False
Me.AllowDeletions = False
Me.AllowEdits = False
Else
Me.AllowAdditions = True
Me.AllowDeletions = True
Me.AllowEdits = True

End If

End Sub
 

gemma-the-husky

Super Moderator
Staff member
Local time
Today, 08:41
Joined
Sep 12, 2006
Messages
15,613
possibly the easiest way is to have an autoexec macro call a "startup" function.

use that to set any special system stuff like this. you could use this to open a different "startup form" for certain users , instead of setting a standard startup form for all users
 

rbh1090

Registered User.
Local time
Today, 19:41
Joined
Aug 5, 2015
Messages
18
The workflow is a consequence of connected processes where each process must end before the other starts.

In a multiuser environment where not all have the same functions, it is necessary to establish who can start and terminate a particular process. For example, maintenance tasks such as: kick users out of the database, compacting and backing up, should be limited to the database administrator only.

Ms Access no longer provides security at user level for the .accdb formats, therefore, a mechanism is needed to allow the identification about who is accessing the application and thus control the workflow.



Continue here: http://www.msaccessdeveloper.pro/#!Access-login-screen/c6x8v/1
 

arnelgp

..forever waiting... waiting for jellybean!
Local time
Today, 16:41
Joined
May 7, 2009
Messages
19,169
Code:
Almost all the ribbon controls, including tabs and groups, have a  getVisible callback.  This allows you to show or hide major ribbon  components pretty much at will.
I'll go for this one.
 

Users who are viewing this thread

Top Bottom