K
keaven
I have a report where there are two CanGrow controls, ProbTitle and
Staff_Comments. I also have three boxes (Vote_A, _B, and _C) which need
to grow to match the height of the longer of the two CanGrow controls.
Here is my (non-working) code that I put in the Detail's OnFormat event:
Code:
' Makes boxes fill entire height of row... or not.
If Me![ProbTitle].Height < Me![Staff_Comments].Height Then
Me![Vote_A].Height = Me![Staff_Comments].Height
Me![Vote_B].Height = Me![Staff_Comments].Height
Me![Vote_C].Height = Me![Staff_Comments].Height
Else
Me![Vote_A].Height = Me![ProbTitle].Height
Me![Vote_B].Height = Me![ProbTitle].Height
Me![Vote_C].Height = Me![ProbTitle].Height
End If
The problem is that Access doesn't know the height of the controls until
the OnPrint event, but you can't set the height of a control in the
OnPrint event.
I remember reading something about processing a report twice in order
for calculated sizes to be known, but i have no idea how to implement
something like that, if its even do-able. Is there any other way for me
to handle this?
-keaven
--
-----------------------------------------------------------------------
Keaven Freeman "There's no place like 127.0.0.1"
usenet[@]keaven[.]com ICQ: 35133457
http://www.keaven.com IM: KeavenMJ
"The box said 'Requires Windows 95 or better' ... so I installed Linux"
-----------------------------------------------------------------------
Staff_Comments. I also have three boxes (Vote_A, _B, and _C) which need
to grow to match the height of the longer of the two CanGrow controls.
Here is my (non-working) code that I put in the Detail's OnFormat event:
Code:
' Makes boxes fill entire height of row... or not.
If Me![ProbTitle].Height < Me![Staff_Comments].Height Then
Me![Vote_A].Height = Me![Staff_Comments].Height
Me![Vote_B].Height = Me![Staff_Comments].Height
Me![Vote_C].Height = Me![Staff_Comments].Height
Else
Me![Vote_A].Height = Me![ProbTitle].Height
Me![Vote_B].Height = Me![ProbTitle].Height
Me![Vote_C].Height = Me![ProbTitle].Height
End If
The problem is that Access doesn't know the height of the controls until
the OnPrint event, but you can't set the height of a control in the
OnPrint event.
I remember reading something about processing a report twice in order
for calculated sizes to be known, but i have no idea how to implement
something like that, if its even do-able. Is there any other way for me
to handle this?
-keaven
--
-----------------------------------------------------------------------
Keaven Freeman "There's no place like 127.0.0.1"
usenet[@]keaven[.]com ICQ: 35133457
http://www.keaven.com IM: KeavenMJ
"The box said 'Requires Windows 95 or better' ... so I installed Linux"
-----------------------------------------------------------------------