how to change datasheet header shortcut menu? (1 Viewer)

CJ_London

Super Moderator
Staff member
Local time
Today, 00:08
Joined
Feb 19, 2013
Messages
16,605
I've assigned a custom shortcut menu to fields on a datasheet form, but cannot locate the correct property for the header shortcut menu.

I have two problems:

1. the standard header shortcut menu includes hide and unhide column options. I don't want users to be able to access these because it will expose some columns I don't want them to see or even be aware of - but I do want them to have access to the other options

2. if the user is using runtime, then the short menu does not work at all.

The solution to both is to provide my own custom shortcut menu, however I can't find where to assign it - I have it assigned to the appropriate controls for the datasheet and it works fine if the user right clicks on a field - but right click on the header and the standard menu appears.

Any suggestions will be much appreciated

CJ
 

RuralGuy

AWF VIP
Local time
Yesterday, 17:08
Joined
Jul 2, 2005
Messages
13,826
Just curious CJ, why use a Datasheet instead of a Continuous Form View. I know you are not lazy! :D
 

CJ_London

Super Moderator
Staff member
Local time
Today, 00:08
Joined
Feb 19, 2013
Messages
16,605
why use a Datasheet instead of a Continuous Form View
The form is a multi use form in that there are a number of columns which need to be there, but not visible to the user (e.g. primary keys, foreign keys, timestamp) and because I don't know how many columns will potentially be required, there are a number of blank columns. The standard unhide shortcut on the datasheet header row shows them all because it is based on the controls. My requirement is to base it on the recordset but exclude fields such as the above. The users will be using it a bit like excel so I need the datasheet functionality.

Bit more background - I moved to binding recordsets to forms rather than using recordsource some time ago. Benefit is improved protection to the password protected back end and I can have queries in the back end which act a bit like sql server views. My front ends contains no tables or queries, and relinking, if required, becomes much simpler. I've not noticed any difference in performance doing it this way

So yes, I could use a continuous form, but then I need to write code to manage specific datasheet functionality - hide/unhide is done but freeze columns, resize columns, move columns around etc still needs to be done. I thought it would be simpler just to either remove the hide/unhide options from the standard shortcut menu or to substitute it with my own - if I could find out how to do it!
 
Last edited:

RuralGuy

AWF VIP
Local time
Yesterday, 17:08
Joined
Jul 2, 2005
Messages
13,826
Thanks for the update CJ. Appreciated.
 

CJ_London

Super Moderator
Staff member
Local time
Today, 00:08
Joined
Feb 19, 2013
Messages
16,605
yup, that's it. The menu is called 'Form Datasheet Subcolumn'. Now to either substitute my recordset based hide/unhide or better to copy the menu to a new custom menu (particularly as some users use runtime). It's 1:30am here, so a job for another day, but can go to sleep happy!
 

Users who are viewing this thread

Top Bottom