reset controls position when open report

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I want to changes controls positions in the report header if the image is
loaded properly. If there is image, I want to move some controls like box,
line, text, lable controls under the image. If no image, move the controls to
the top, so it will be no blank spot, if image is no there. I tried add the
following code in the ReportHeader0_Format event. It does not work, what I
did wrong???

If Me.imgLogo.Picture = "C:\MiracleDB\defaultLogo.bmp" Then
Me.imgLogo.Visible = False
Me.Company_Name.top = 0.0104
Me.Field121.top = 0.2604
Me.Box5.top = 2.0813
Me.Text6.top = 2.0813
else
Me.imgLogo.Visible = true
Me.Company_Name.top = 0.9833
Me.Field121.top = 1.2542
Me.Box5.top = 2.0813
Me.Text6.top = 2.0813
end if

(It worked once though when I use my testing report with the similar code,
then itstop working when I starting working on the real report)
 
Why do OPs often post or reply "It does not work" without stating anything
about their results or what's wrong?

Do you realize the units generally used for positioning controls is 1/1440th
of an inch (twips)?
 
Back
Top