resizing detail height on event Detail_Format

J

jryder

I'm having a trouble resizing the detail height using this code on
Detail_Format:

If IsNull(Me.ImagePath) Or IsEmpty(Me.ImagePath) Or Me.ImagePath = "" Then
Me.Detail.Height = 0.4063 * 1440
Me.Image15.Visible = False
Me.Image15.Height = 0.2813 * 1440
Else
Me.Detail.Height = 1.3958 * 1440
Me.Image15.Visible = True
Me.Image15.Picture = Nz(Me.ImagePath, "")
Me.Image15.Height = 1 * 1440
End If

Even when a image is not displayed, the formated detail height is greater
than 0.4063 * 1440.
Can somebody tell me why this isn't working? There are no other controls
that would prevent
Detail.Height from shrinking to 0.4063 * 1440.
 
M

Marshall Barton

jryder said:
I'm having a trouble resizing the detail height using this code on
Detail_Format:

If IsNull(Me.ImagePath) Or IsEmpty(Me.ImagePath) Or Me.ImagePath = "" Then
Me.Detail.Height = 0.4063 * 1440
Me.Image15.Visible = False
Me.Image15.Height = 0.2813 * 1440
Else
Me.Detail.Height = 1.3958 * 1440
Me.Image15.Visible = True
Me.Image15.Picture = Nz(Me.ImagePath, "")
Me.Image15.Height = 1 * 1440
End If

Even when a image is not displayed, the formated detail height is greater
than 0.4063 * 1440.
Can somebody tell me why this isn't working? There are no other controls
that would prevent
Detail.Height from shrinking to 0.4063 * 1440.


I am not familiar with the idiosyncracies of the image
control, but with other controls, the section can not be
made smaller than required to display all controls (even if
currently invisible). Try setting the control's Top
property to 0 when you make it invisible.
 
S

Stephen Lebans

I always address the Detail section object like:
Me.Section(acDetail).Height


--

HTH
Stephen Lebans
http://www.lebans.com
Access Code, Tips and Tricks
Please respond only to the newsgroups so everyone can benefit.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top