Set PageHeader Height (1 Viewer)

ascaife

Registered User.
Local time
Tomorrow, 04:41
Joined
Nov 10, 2008
Messages
50
Hi all,

I hope someone can help.

I have an access report with an unbound OLE word document linked inside it. The report is basically a letter in response to a customer enquiry. I've used data fields for the name, address etc.

This works great and allows users to change the letter to their requirements, however, since the users will all have their own different letterheads, I need to find a way to store a value somewhere that sets the height of the pageheader.

The database is locked down so there's no way for users to change the report settings themselves, but if I could somehow have a settings section where they can specify this value and store it that would be great.

I'm trying to avoid a MS word mail merge due to the number of different versions of office, but if someone has any better ideas please let me know.

Cheers,

Andy
 

wiklendt

i recommend chocolate
Local time
Tomorrow, 04:41
Joined
Mar 10, 2008
Messages
1,746
you could try programming the page header height to match that of the tallest control (presumably there are several controls in the header section, such as logo, company name...)

not sure what the code would look like. presumably in the on format property of the page header section, something resembling:

Code:
    Dim intMaxHeight As Integer
    Dim ctl As Control
    
    'Find tallest control in Report Header
    For Each ctl In Me.Section(acHeader).Controls
        If ctl.Height > intMaxHeight Then
            intMaxHeight = ctl.Height
        End If
    Next

    Me.Section(1).Height = intMaxHeight

but that's "air-code" and untested... see if it gives you any progress...
 

Users who are viewing this thread

Top Bottom