X   Site Message
(Message will auto close in 2 seconds)

Welcome to UtterAccess! Please ( Login   or   Register )

Custom Search
   Reply to this topicStart new topic
> Border To Resize With Image Or Text, Access 2013    
post Jun 20 2019, 05:20 PM

Posts: 334
Joined: 23-April 13
From: WV, USA

Hello, I have a report with images and t memo field on the same line. The issue I'm having is a image box cant grow like a text field and then I'm left with a tiny image the size of the text box. I need the text box and the image to be same size of the image if there is one and if no image then the image box the same size of the text box.


Private Sub Detail_Print(Cancel As Integer, PrintCount As Integer)

Dim CtlDetail As Control
Dim intLineMargin As Integer

' This is the spacing between the right edge of the control and the Vertical Seperation Line
intLineMargin = 60

' OK lets draw a vertical line to seperate each field
' for each control in details control
' If your last control on the right does not end on the edge of the section
' you will get a second vertical line. If you need to get around this then you
' can skip drawing this last Vertical Seperation Line in a couple of ways.
' We'll use the control name method Here. Our right most control is named
' TestMemo. IF current control is TestMemo - Do not print Vertical Line

For Each CtlDetail In Me.Section(acDetail).Controls
   If CtlDetail.Visible = True Then 'Added
    With CtlDetail

        Me.Line ((.Left + .Width + intLineMargin), 0)-(.Left + .Width + _
intLineMargin, Me.Height)
    End With 'Added
    End If

        'While we are here lets draw a box around the Detail section
    With Me
        Me.Line (0, 0)-Step(.Width, .Height), 0, B
    End With

Set CtlDetail = Nothing

End Sub
Go to the top of the page
post Jun 20 2019, 05:47 PM

Posts: 730
Joined: 25-January 16

Seem to remember dealing with this same issue in another thread and came to conclusion dynamically resizing Image control on report not feasible. Suggested having a generic "No Image Available" image.

Attachments Manager is below the edit post window. To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.
DEBUG! DEBUG! DEBUG! http://www.cpearson.com/Excel/DebuggingVBA.aspx
Go to the top of the page

Custom Search

RSSSearch   Top   Lo-Fi    21st August 2019 - 02:40 AM