Change font on report

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Phil Stanton

    Change font on report

    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


  • Rick Brandt

    #2
    Re: Change font on report

    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


    Comment

    • lyle fairfield

      #3
      Re: Change font on report

      On Sun, 13 Apr 2008 12:06:07 -0400, Rick Brandt <rickbrandt2@ho tmail.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

      Comment

      • Phil Stanton

        #4
        Re: Change font on report

        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" <lylefa1r@yah00 .seeaywrote in message
        news:op.t9j7yw1 78zlfnw@vostro-desktop.budu3.o n.cogeco.ca...
        On Sun, 13 Apr 2008 12:06:07 -0400, Rick Brandt <rickbrandt2@ho tmail.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


        Comment

        Working...