Prevent Column Hide

Anyone know how to prevent the user from hiding a column?

My client wants to make sure that certain columns are always visible not just as a default.

There is no property you can use to prevent it.

You could either set the property Visible of the field to true on the OnTimer trigger or you could just make sure that the field always is visible when the user opens the form by adding code to the OnOpenForm trigger, e.g.

CurrForm.MyField.VISIBLE := TRUE;

Regards

Claus

Hi Colin,

what I normally do is:

Create a new function int he Form SetVisibleFields.

In this funciton add the code:

CurrForm.MyField.VISIBLE(TRUE);
CurrForm.MyField2.VISIBLE(TRUE);
CurrForm.MyOtherField.VISIBLE(TRUE);

then you need to experiment with the actual cleint needs to determine where to call the trigger.

Start with
OnOpenForm and OnGetCurrentRec. These two are normally enough.

if the client is really strict they may want it added to more places, but you will need to play around with it.

Thanks David,

Sarbanes-Oxley rearing it’s ugly head here.

I have explained that it is not strictly a requirement (as far as I know) as long as there are enough error traps before printing and posting.

Rgds,

Colin

You will have to put code as mentioned by others, put it on the OnOpenForm & OnActivate Trigger so that whenever a user hides a column and comes back to the form it will be visible again :wink:

Vishal