Disable grey out

boerbende

Ben
Local time
Today, 04:25
Joined
Feb 10, 2013
Messages
339
Dear readers,

I use tabs in a form to group fields which belong "together".
For example I have a tab for ORDER, RECEIPT, CONTROL, USE, etc
An advantage is that it is easy to disable all fields on one tab, by setting the
tabname.enabled = false. So the person who receives, cannot change the order etc...
(it is not exactly like that, but it draws my situation)

However, when I use tabname.enabled = false, all fields on that tab are then greyed out. I think this makes the fields less easy readable for users.
To avoid grey out, I work now with locked, but this works not for TABS, so I have to do it for all the single fields on a TAB

Is there an option to switch off this "grey out" option. So I like the TABNAME.enabled option, but this grey out is not for all users good readable

Thanks in advance

Ben
 
You could set a tag value on all the Fields on a tab to a suitable value pgOrder , pgControl etc.
Then loop through and lock and unlock or colour and lock them when the tab is selected based on the users access level. You would only need one bit of code that could be called for each tab page in turn when selected.
 
In essence, as you asked the question, the answer is NO. There is no "global" locked property for a tab. Now, if the tab was the ENTIRE FORM, you could change the form to "EditsAllowed = False" - but that would not disable command buttons and single-click or double-click events. Also wouldn't disable GotFocus/LostFocus events.

I think you would do better simply writing a loop or having a subroutine and just call it a bunch of times for the controls on that tab, but that's just my opinion.
 
Thanks Doc-Man and Minty. This is exactly what I am doing right now (a lot of code and call it after each afterupdate event)
Sorry to hear it can't be done much more easy.
Thought later by the way to use a transparent rectangle inside a tab over all fields which will be placed as top layer with VBA when I want to disable. Maybe I'll try this once.

regards
 
FWIW, if I had users doing such diverse tasks as what I imagine you mean by "Ordering" and "Receiving", I would give them completely different forms to use. I think your enabling/locking-by-tabname problem is a kind of unnecessary overhead that you avoid if you provide distinct user interface elements (forms) that are specifically targeted to solve particular tasks or workflow problems.

9-in-1 type tools are always a compromise.
 

Users who are viewing this thread

Back
Top Bottom