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????
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????