Comact and repair menue (1 Viewer)

Dreamweaver

Well-known member
Local time
Today, 14:37
Joined
Nov 28, 2005
Messages
2,466
I am using the following ribbon button but want to set a can close boolean is there a way using this

Code:
 <button idMso="FileCompactAndRepairDatabase" label="Compact and Repair" visible="true"
              size="large" supertip="Maintain the health of your database by compacting and repairing"/>
        </group>
To call a function to set the canclose boolean

I have been looking at using the Cammand bar but not got that working
 

theDBguy

I’m here to help
Staff member
Local time
Today, 07:37
Joined
Oct 29, 2018
Messages
21,358
Hi Mick. Not sure I understand. What is "can close boolean?" Is that a variable or a function? If you're asking how to call your own function from the ribbon, the answer would be, you don't use idMso.
 

Dreamweaver

Well-known member
Local time
Today, 14:37
Joined
Nov 28, 2005
Messages
2,466
Sorry it was something I was playing with to prevent users from using the x top right and closing access, incorrectly or not the way I wanted which worked perfectly except the below.
I was using a ribbon exit think it might have started as your ribbon example, I have a compact and repair on the ribbon but as the main control cannot be closed except via the exit button it prevents the compact and repair so was looking at using some code that can use the menue so I can add it to a function or edit the code below to call my function but not sure if that is even possible.


Code:
 <button idMso="FileCompactAndRepairDatabase" label="Compact and Repair" visible="true"
              size="large" supertip="Maintain the health of your database by compacting and repairing"/>
        </group>

I have seen example of command bar code but not managed to get that working in 2016.

thanks mick
 

theDBguy

I’m here to help
Staff member
Local time
Today, 07:37
Joined
Oct 29, 2018
Messages
21,358
Sorry it was something I was playing with to prevent users from using the x top right and closing access, incorrectly or not the way I wanted which worked perfectly except the below.
I was using a ribbon exit think it might have started as your ribbon example, I have a compact and repair on the ribbon but as the main control cannot be closed except via the exit button it prevents the compact and repair so was looking at using some code that can use the menue so I can add it to a function or edit the code below to call my function but not sure if that is even possible.


Code:
 <button idMso="FileCompactAndRepairDatabase" label="Compact and Repair" visible="true"
              size="large" supertip="Maintain the health of your database by compacting and repairing"/>
        </group>

I have seen example of command bar code but not managed to get that working in 2016.

thanks mick
Okay, just thinking out loud here, since I'm not currently in front of a computer. Like I said earlier, if you want the ribbon button to perform multiple actions, which is what it sounds like to me, then you can't use idMso, so you can use the onAction callback.

So, as a thought, try using imageMso instead and then create a callback for your button. To execute the idMso button, you could try using executeMso (or something like that).

Hope it helps...

Sent from phone...
 
Last edited:

Users who are viewing this thread

Top Bottom