"Can Grow" across multiple objects

G

Guest

I have made a Report from my data which ended up looking like a spreadsheet.
It has multiple fields side-by-side within the detail section. One of the
fields is a memo field that I have set "Can Grow" to yes because some of the
data can become lengthy.

When the memo field grows vertically, the other fields next to this field
does not grow with it and makes the Report look messy. Is there a way to
make these other fields grow when the memo field grows?

Thanks,
Mark
 
P

PC Datasheet

In the OnFormat event of the detail section, set the height of the other
fields to the height of the memo field:
Me!MyField.Height = Me!MemoField.Height
 
G

Guest

Thanks so much for your help, but you may need to "dumb it down" so I
understand. This is what I unsuccessfully attempted. It does NOT give
errors, just does nothing.

Right click on the Detail section and chose Properties. In the On Format
line I chose Event Procedure. Right Click on the Detail Section again and
chose build event. This brought up VB. Within the Detail_Format, I entered
Me!ProcessInstr1.Height = Me!ProcessInstr8.Height. ProcessInstr1 is the
smaller field and ProcessInstr8 is the larger memo field.

Below is the Detail_Format section from my VB code...

Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)

Me!ProcessInstr1.Height = Me!ProcessInstr8.Height

End Sub

Any further help will be much appreciated,
Mark
 
M

Marshall Barton

p8md said:
I have made a Report from my data which ended up looking like a spreadsheet.
It has multiple fields side-by-side within the detail section. One of the
fields is a memo field that I have set "Can Grow" to yes because some of the
data can become lengthy.

When the memo field grows vertically, the other fields next to this field
does not grow with it and makes the Report look messy. Is there a way to
make these other fields grow when the memo field grows?


This is a tricky situation. Your controls have no need to
grow so their border stays where it was. Actually, you
don't want the control to grow, you only want the lines
around the control to be even. Since that won't happen
automatically, you need to set the border style for all of
them to transparent and draw the lines yourself using the
Line method.

Since the memo field's (and the detail section's) final
height is not known at the time of the Format event, you
have to do this in the Print event.

If you want to use a ready made code solution for this, use
the PrintLines file at www.lebans.com
 
D

Duane Hookom

Don't even try this solution since it is bound to fail. Marsh has provided
the recommended solution.
 

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