Question Hiding Command Buttons

iceburg

Registered User.
Local time
Today, 03:40
Joined
Feb 12, 2009
Messages
10
I have a simple database that has a command button on each record that can enable the user to delete that particular record. However this is quite easy to do and may be clicked accidentally. Is there any way I can hide or make the command button harder to use so only certain users know how to use or find it.

Any help would be greatly appreciated.

Thanks.
 
In line with your other post You will need to maintain a table of users and their access rights/permissions then when a user logs in it retrieves their preferences and lets say you have indicated that they cannot delete records you would have a public variable called CanDelete set as Boolean. Then when a user loads a record on screen the delete button would have the CanDelete result implied. Such as:

Me.CmdDelete.Enabled = CanDelete

You can adopt this senerio for lots of other preferences. Remember you will need to have login screen that accepts a username and password.

David
 
As to WHERE you do this, the form.load event is where you have the first chance to decide what should or should not be on the form. That is where you would enable or disable the button. And where you can set or clear its .visible property. I generally take the approach that if I don't want you to use something, I not only disable, I also remove the temptation of clicking it by making it invisble.
 

Users who are viewing this thread

Back
Top Bottom