resizing detail height on event Detail_Format

  • Thread starter Thread starter jryder
  • Start date Start date
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.
 
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.
 
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.
 
Back
Top