New vs old buttons on a form (1 Viewer)

Gkirkup

Registered User.
Local time
Today, 08:27
Joined
Mar 6, 2007
Messages
628
I have a big application with many old and new forms. When I put a button onto a new form, it looks just as you would expect, a button to click on.
But on old forms the buttons look like a simple rectangle. If I add a new button to an old form, it looks like a simple rectangle and not like a button at all.
Is there a setting for the form that I can change that will allow new type buttons to be added?

Robert
 

arnelgp

..forever waiting... waiting for jellybean!
Local time
Today, 23:27
Joined
May 7, 2009
Messages
19,246
try setting to "Yes" the control's "Use Theme" setting.
if it does not work, then you have to create new form.
 

Pat Hartman

Super Moderator
Staff member
Local time
Today, 11:27
Joined
Feb 19, 2002
Messages
43,392
I find that Access has lately been losing formatting for buttons. Can't pin down the cause but it feels like I keep having to fix buttons a lot.

Anyway, you may need to fix the format on the old forms to make them look three dimensional. Just select all the buttons at once to minimize the clicking required.
 

petertheme

New member
Local time
Today, 16:27
Joined
Feb 25, 2022
Messages
14
I have a big application with many old and new forms. When I put a button onto a new form, it looks just as you would expect, a button to click on.
But on old forms the buttons look like a simple rectangle. If I add a new button to an old form, it looks like a simple rectangle and not like a button at all.
Is there a setting for the form that I can change that will allow new type buttons to be added?

Robert
Sorry for the delay i only just noticed this.
To make old buttons look like new buttons you would need to set the use Theme property but also Back, Hover, Pressed, HoverFore and PressedFore Colors using Theme colors to Accent1 and Text1 with the relevant Lighter and Darker percentages.
The properties to use in VBA are BackThemeColorIndex, HoverThemeColorIndex etc. Lighter values use the property BackTint, HoverTint etc darker percentages use BackShade, HoverShade etc. The tint and shade are equal to 100 - the percentage that shows on the property sheet.
You also need to set the Shape property and Gradient which are not visible in the property sheet but can be found in the properties in the VB Editor properties pane.

Rather than setting the properties manually, you can use the Format Painter, double-clicking it will allow you to change multiple controls.
You may still have to set the gradient manually as a change to the back color now sets the gradient to solid color. That is a feature not a bug.

The problem will remain with any new buttons you create on the form. Each form stores the default properties for controls that are used at the time the form was created. To have new Buttons look like new style buttons you would need to set the default properties accordingly.

Once Themed you can change the colors on all buttons in the database by simply setting a new theme. Many people don't use themes since the Themes that Microsoft offer use varying fonts that might not fit controls.
The way to resolve that is to create a new theme with the desired fonts.
Simple way to create new font is to use my free TMDThememaker
 

petertheme

New member
Local time
Today, 16:27
Joined
Feb 25, 2022
Messages
14
I find that Access has lately been losing formatting for buttons. Can't pin down the cause but it feels like I keep having to fix buttons a lot.

Anyway, you may need to fix the format on the old forms to make them look three dimensional. Just select all the buttons at once to minimize the clicking required.
If it is the gradient you have problems with its because Microsoft changed the behaviour so that if a button back color is changed the gradient is set to a constant back color. That affects both Standard and Themed colors. They changed it because some people were having text on buttons not having sufficient difference from the back color, I think that was in powerpoint. All office products share Themes.
 

Pat Hartman

Super Moderator
Staff member
Local time
Today, 11:27
Joined
Feb 19, 2002
Messages
43,392
Thanks Peter. I wasn't using a gradient. The app was created in 2006 with 2003 and converted. I changed all the buttons to the raised format a few months ago but when I went to change the app again in Feb, some of the buttons had reverted. I changed them all again so I hope this time the change sticks. It's kind of amazing that the app is still alive and well and the client still loves it.
 

Users who are viewing this thread

Top Bottom