Change font on report

Change font on report

am 13.04.2008 17:42:03 von Phil Stanton

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

Re: Change font on report

am 13.04.2008 18:06:07 von Rick Brandt

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

Re: Change font on report

am 13.04.2008 19:24:22 von Lyle Fairfield

On Sun, 13 Apr 2008 12:06:07 -0400, Rick Brandt > =

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 =3D GetFontName
On Error Resume Next
For Each ctrl In Me.Controls
ctrl.FontName =3D font
Next ctrl
End Sub

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

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

--
lyle fairfield

Re: Change font on report

am 13.04.2008 23:49:41 von Phil Stanton

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" wrote in message
news:op.t9j7yw178zlfnw@vostro-desktop.budu3.on.cogeco.ca...
On Sun, 13 Apr 2008 12:06:07 -0400, Rick Brandt
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