Uniform field heights

saintsman

Registered User.
Local time
Today, 20:44
Joined
Oct 12, 2001
Messages
138
Is there a way of ensuring that fields in a report print the same size?

My field's border colours are set to black so that the report prints it shows a grid, but one field has the can grow property set to yes. When it does grow it makes the report look odd. Some of the fields contain text and some are just a box.

Any suggestions?
 
So are you saying that you want that field to grow, but your problem is that the rest of the fields on there in that line don't grow at the same time and it looks bad?

If so, I found the following code on these forum which automatically resizes the rest of the fields if one grows. It really does a brilliant job. You just need to tweak where you place the controls a little.

Private Sub Detail_Print(Cancel As Integer, PrintCount As Integer)
Dim CtlDetail As Control
Dim intLineMargin As Integer


intLineMargin = 60


For Each CtlDetail In Me.SECTION(acDetail).Controls
With CtlDetail

Me.Line ((.Left + .Width + intLineMargin), 0)-(.Left + .Width + _
intLineMargin, Me.Height)

End With
Next
With Me
Me.Line (0, 0)-Step(.Width, .Height), 0, B
End With

Set CtlDetail = Nothing

End Sub
 
You hit the nail on the head.

Thanks for the speedy response.

saintsman
 

Users who are viewing this thread

Back
Top Bottom