[AccessD] Ribbon context

Gustav Brock gustav at cactus.dk
Tue Jan 25 02:32:18 CST 2022

Hi Ryan

You could run the application in runtime mode.


PS: How do you manage typing that amount of text on your phone?

-----Oprindelig meddelelse-----
Fra: AccessD <accessd-bounces+gustav=cactus.dk at databaseadvisors.com> På vegne af Ryan W
Sendt: 25. januar 2022 01:39
Til: accessd at databaseadvisors.com
Emne: [AccessD] Ribbon context

In Access I’m trying to disable some ribbon buttons based on the form in question and permissions to delete records on that form. 

I’ve got the getEnabled logic worked out and it disables the delete button on the ribbon when I invalidate the control via the OnActivate event for the form (so it runs again if the form tab is switched back). 

My issue is we have hundreds of forms that would need an OnActivate event added so the delete button can be contextually controlled. 

Is there a better way to do this that isn’t a really fast timer event or some sort of class for handling that event on all forms (can you even instantiate a class object on a closed form?)

Right now the delete button always shows but the code behind it will not succeed if the back end tables don’t grant the permissions, it would just be nice to sort of give a visual cue that the action isn’t possible. 

Sent from my iPhone

More information about the AccessD mailing list