By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
429,087 Members | 1,513 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 429,087 IT Pros & Developers. It's quick & easy.

Change font on report

P: n/a
Correct me if I'm wrong, but is it impossible to change the font in a report
field when in print preview (MDE database) or can it only be done in design
view in the MDB database.
Part of my database is used to print name tags for functions, and it would
be nice for the operator to have a choice of different fonts, colours and
backgrounds.
I have a copy of Terry Kreft and Stephen Lebans font selector mdb

Thanks

Phil
Jun 27 '08 #1
Share this Question
Share on Google+
3 Replies


P: n/a
Phil Stanton wrote:
Correct me if I'm wrong, but is it impossible to change the font in a
report field when in print preview (MDE database) or can it only be
done in design view in the MDB database.
Part of my database is used to print name tags for functions, and it
would be nice for the operator to have a choice of different fonts,
colours and backgrounds.
I have a copy of Terry Kreft and Stephen Lebans font selector mdb

Thanks

Phil
You can change the font (temporarily) using code in the various events of
the report itself. That means that you could give the user a means to
choose the font before they preview, but once opened in preview they would
have to close it, change the font choice, and then preview it again. You
cannot apply the change live on the preview window.

--
Rick Brandt, Microsoft Access MVP
Email (as appropriate) to...
RBrandt at Hunter dot com
Jun 27 '08 #2

P: n/a
On Sun, 13 Apr 2008 12:06:07 -0400, Rick Brandt <ri*********@hotmail.com
wrote:
You can change the font (temporarily) using code in the various eventsof
the report itself. That means that you could give the user a means to
choose the font before they preview, but once opened in preview they
would
have to close it, change the font choice, and then preview it again. You
cannot apply the change live on the preview window.
With Northwinds 2007 this allows me to change the font for the controls in
Customer Address Book report on the fly and to print in whatever font I
have chosen.
Of course, if I were going to use this I'd create something kinder that an
input box as a font chooser.
Seems to work OK after converted to ACCDE as well.

Private Sub Report_DblClick(Cancel As Integer)
Dim ctrl As control
Dim font$
font = GetFontName
On Error Resume Next
For Each ctrl In Me.Controls
ctrl.FontName = font
Next ctrl
End Sub

Public Function GetFontName$()
GetFontName = InputBox("Font Name")
End Function

Perhaps, this isn't what is being discussed, of course. I'm not sure.

--
lyle fairfield
Jun 27 '08 #3

P: n/a
Thanks guys

Found the easiest way was to create a table with the font charactaristics
such as name, size, colour bold etc by loading the information from the
standard font and colour picker dialogue boxes, then format the report
fields on the OnOpen Event of the report

Thanks agin for your help

Phil
"lyle fairfield" <ly******@yah00.seeaywrote in message
news:op***************@vostro-desktop.budu3.on.cogeco.ca...
On Sun, 13 Apr 2008 12:06:07 -0400, Rick Brandt <ri*********@hotmail.com>
wrote:
You can change the font (temporarily) using code in the various events of
the report itself. That means that you could give the user a means to
choose the font before they preview, but once opened in preview they
would
have to close it, change the font choice, and then preview it again. You
cannot apply the change live on the preview window.
With Northwinds 2007 this allows me to change the font for the controls in
Customer Address Book report on the fly and to print in whatever font I
have chosen.
Of course, if I were going to use this I'd create something kinder that an
input box as a font chooser.
Seems to work OK after converted to ACCDE as well.

Private Sub Report_DblClick(Cancel As Integer)
Dim ctrl As control
Dim font$
font = GetFontName
On Error Resume Next
For Each ctrl In Me.Controls
ctrl.FontName = font
Next ctrl
End Sub

Public Function GetFontName$()
GetFontName = InputBox("Font Name")
End Function

Perhaps, this isn't what is being discussed, of course. I'm not sure.

--
lyle fairfield
Jun 27 '08 #4

This discussion thread is closed

Replies have been disabled for this discussion.