reset controls position when open report

M

Ming

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)
 
D

Duane Hookom

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)?
 

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