Font and Font Size on Custom Toolbar

G

Glenn Suggs

I have a report that I want to associate with a toolbar that contains the
font and font size boxes. I'd like for the user to be able to select the
font and font size (while previewing) for the report when it is printed. But
when I create a custom toolbar for this purpose, the font and font size boxes
are blank. What am I doing wrong here? Apparently this isn't the correct
way to use these options on a custom toolbar.

Thanks in advance,
 
W

Wolfgang Kais

Hello Glen.

Glenn said:
I have a report that I want to associate with a toolbar that contains
the font and font size boxes. I'd like for the user to be able to select
the font and font size (while previewing) for the report when it is
printed. But when I create a custom toolbar for this purpose, the
font and font size boxes are blank.
What am I doing wrong here?

I think that you can't change the font properties when viewing the
preview, you will have to change them in design view.
 
G

Glenn Suggs

What would be the best way to give the user the option of what font to use
when printing a report?
 
S

Stephen Lebans

You can open the Windows standard Font Dialog. See:
http://www.lebans.com/fontcolordialog.htm
ChooseFontColorDialog.zip is a database containing functions showing
how to call the API Font and Color Dialogs.

NEW - Jan. 28/2000 The Font and Color Dialogs are very easy to call.
Here is the code behind the Command Button on the sample Form. For this
sample we pass a TextBox that the function fills in with the Name and
Size of the Font selected by the user.

Private Sub CmdChooseFont_Click()
Dim lngRet As Boolean
' Pass the TextBox Control to the function
lngRet = test_DialogFont(Me.textCtl)
End Sub

Based on original code written by Terry Kreft.

--

HTH
Stephen Lebans
http://www.lebans.com
Access Code, Tips and Tricks
Please respond only to the newsgroups so everyone can benefit.
 
G

Glenn Suggs

Stephen:
Thanks for the response. I had seen the example on www.lebans.com but
wasn't sure how to implement it into my project. The example loads a text
box control with the font properties after the user makes the selection from
the dialog box. What I need to do is load the properties of 8 text boxes on
the report after the user has input data into a form and has selected the
font and size. I have this working in the Open event of the report but how
can I store the properties so that the user can input the font/size only once
and have all 8 text boxes take on those properties.

Thanks in advance,
 
S

Stephen Lebans

Open the Report in Design view, make the modifications to the desired
Control's properties and then Save the report.

--

HTH
Stephen Lebans
http://www.lebans.com
Access Code, Tips and Tricks
Please respond only to the newsgroups so everyone can benefit.
 
G

Glenn Suggs

Actually, the idea was to give the user the ability to set the font and size
while the app is running and not have to switch to design view. But I think
I worked out a solution. Instead of passing the one control on the form to
the Font Selection routine, I passed all eight controls on the report during
the ReportOpen event and set the font/size for all of them in that procedure.
 
Top