Urgent problem - facing deadline!!!

wrekless

Registered User.
Local time
Today, 13:10
Joined
Jun 1, 2000
Messages
31
Need some help quick,
I have a form that has many, many fields, and I've set them all to visible=false.
I use a loop saying basically if the field is populated, then make it visible and assign a .Top value to it, so as to condense the information. The top value is an integer variable that I increment.

The form works fine. The problem is that this same code won't work in the Report, Open Event. Here it is:

If IsNull(Me.Controls(PCField)) = False Then
Me.Controls(FieldName).Visible = True
Me.Controls(FieldName).Top = USDTopPosition
Me.Controls(FieldLabel).Visible = True
Me.Controls(FieldLabel).Top = USDTopPosition
Me.Controls(PCField).Visible = True
Me.Controls(PCField).Top = USDTopPosition
Me.Controls(PCField).Left = 4000
End If

For the report, I get every field, not only the populated ones. Why????
 
Also you may need to use the On Activate event of the report instead of the On Open event.

RDH
 
If the activate button doesn't work for you, then try the On format event of the detail section. Your problem has to do with the timing on the population of the data.
 
Thanks a lot guys, the on format worked for me...Travis actually was the first to get to me, but all your help was VERY much appreciated.
 

Users who are viewing this thread

Back
Top Bottom