Access 2007 Updating Command Button

francesmidgley

New Member
Joined
Sep 10, 2011
Messages
5
Hi, I have several of the MrExcel books and videos;BRILLIANT! However, I have a question I can't find the answer to.

I have an Access 2007 database with hundreds of command buttons and I need to change the font on all of them from Calibre 10 to Arial 10. Is it possible to do this using basic Visual Basic or SQL?
If it is, do you know the vb code?
Thanks in advance, Regards Frances
 

Excel Facts

Copy PDF to Excel
Select data in PDF. Paste to Microsoft Word. Copy from Word and paste to Excel.
You can do all the selected controls in one go by just changing the Font property.

There is definitely no way to do it with SQL but you could do it with VBA.

Can you give more details of the forms/controls you want to change?

PS Just curious but why go you have so many command buttons?

Do you have a lot of forms?
 
Upvote 0
Hi Norie
Thank you for replying so quickly. Yes there are a great many forms and some reports each with up to six command buttons. E.g. one button is cmdPrint it has the word Print on the button another is cmdMainMenu with the word Main Menu which takes the user to a switchboard . The font on the buttons need changing to Arial for the whole database. I am sure there must be way of doing this without me having to select each individual button on every form can you help.
Thanks,
Frances
 
Upvote 0
Frances

The only way to do it would be to loop through all forms and open them in design view.

Then loop through the controls on each form, identify the command buttons and change the Font.

Using code of course.

That's why I asked for more information on the forms you want to change, to see if it's possible to restrict the loop.
 
Upvote 0
Hi Norie,
Thank you for replying. I have lots of forms, too many to write here, but here are a selection (separated by a semicolon) frmInstallerListC; frmFilterProductC; frmDataInputT; frmFilterMarketing; frmCCDataInputC.

Hi TechCoach
No I am not using the build in themes. There are two reasons I have to use Arial 1 it is the company's preferred font and 2 some printers do not recognise Calibre and the text comes out looking like Arabic.

Hope you can help! Thanks either way. Frances
 
Upvote 0
Frances,

A agree with Norie that you can do what you want with VBA code.

What Norie was requesting is not the names of the forms. They can easily be looked up. What we do need to know is more information about the design of the forms.

For example:
Are the buttons that need to be change named the same on every form?

What programing logic can you use to identify the controls that need to be changed?
 
Upvote 0
Hi,
Sorry I understand now ... yes all the buttons have the same names cmdPrint cmdPreview cmdFind cmdNext cmdPrevious. Hope that makes things clearer. Thanks! Frances
 
Upvote 0
Is it only command buttons that need the font changed?
 
Upvote 0
Yes Norie only the font on the buttons need changing at present. Although I would be interested in how to change the height overall. Perhaps you could point me towards a book or training material that can give the VBA code?
 
Upvote 0

Forum statistics

Threads
1,215,415
Messages
6,124,768
Members
449,187
Latest member
hermansoa

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top