Controlling position of objects in Reports

  • Thread starter Thread starter McKeown NewsGroup Account
  • Start date Start date
M

McKeown NewsGroup Account

Hi
I'm trying to position a photo caption under a photo on a report.

On the Onformat event I have

me!photocaption1.top=me!reportphoto1.top+me!reportphoto1.height+10

where photocaption is the caption and
reportphoto1 is the photo.

There are other fields on the report.

What happens is that the caption is nowhere near the report. Much lower. I
tried to do it manually but the caption jumps.

That is:

photocaption.top=reportphoto1.top+1678 puts it close to the photo BUT
photocaption.top=reportphoto1.top+1679 puts it way below.

What I'm I missing?

Thanks

Leonard
 
I'm trying to position a photo caption under
a photo on a report.

On the Onformat event I have

me!photocaption1.top=me!reportphoto1.top+me!reportphoto1.height+10

where photocaption is the caption and
reportphoto1 is the photo.

I suppose my question is "Why?" Is there some reason that you can not
visually place your Image frame (or other control to display the picture)
and the TextBox at design time? With CanGrow and CanShrink and the various
graphics mode options available in graphics controls, you can do just about
anything I've ever found useful in reports.

I've done some reasonably complex reports and I have not encountered a
compelling need to move controls around with code at runtime. Sometimes I do
have some code to flip the Visible property on/off, though.

And, even with the actual report in hand, it may not be _easy_ to determine
why 1678 twips is close to the picture, but 1679 twips is far below it. I'd
look to see if that one twip makes it overlap vertical position with some
other control that is alongside it and if that might affect the positioning.
But, my first try would be to carefully examine the needs and determine if I
could not do it without the "code solution".

Larry Linson
Microsoft Access MVP
 
Back
Top