user select font, font size, bold, etc

E

Eric

Hello,

I have designed a basic form on Access 2000 that contains
a number of fields taken from a table. I want the user to
be able to change the font, font size, bold, etc upon
demand.

I guess one can highlight field by field and selecting the
appropriate font. This is a pain in the **, especially
since the form contains over 50 fields. Furthermore, the
font change will not apply to labels this way.

I guess the key question is how can I do this without
getting into the design view? API? Anyone know a few
good links to this? On the same note, how can I select
all fields at once from the form view?

like always, thanks for any input

Eric
 
I

Ian Baker

Eric
Firstly you would need some mechanism for the user to select the font, size,
bold etc perhaps a popup form where the user selects from list boxes etc.
Next you would need a button on that popup form to apply the selections. The
code behind that button could be:
Dim ctl As Control

For Each ctl In Forms!MyForm
If ctl.ControlType = acTextBox _
Or ctl.ControlType = acComboBox _
Or ctl.ControlType = acListBox _
Or ctl.ControlType = acLabel Then

ctl.Properties("FontName") = "Arial"
ctl.Properties("FontSize") = 10
End If
Next ctl

You will see that you can define what control types (eg text boxes, combo
boxes, labels etc) you wish to apply your changes to and the above example
shows the changes of the font to Arial and the size to 10. These formating
properties are what can be changed on the control properties format tab.
Instead of having "Arial" as the FontName you would insert a reference to
the control on the popup form that lists the font names.

Hope this helps
--
Regards

Ian Baker
Jackaroo Developments Pty Ltd
Download Jackaroo (an IT Help Desk application) at Web:
http://jackaroo.net.au
| Hello,
|
| I have designed a basic form on Access 2000 that contains
| a number of fields taken from a table. I want the user to
| be able to change the font, font size, bold, etc upon
| demand.
|
| I guess one can highlight field by field and selecting the
| appropriate font. This is a pain in the **, especially
| since the form contains over 50 fields. Furthermore, the
| font change will not apply to labels this way.
|
| I guess the key question is how can I do this without
| getting into the design view? API? Anyone know a few
| good links to this? On the same note, how can I select
| all fields at once from the form view?
|
| like always, thanks for any input
|
| Eric
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top