fat controller
Slightly round the bend..
- Local time
- Today, 04:54
- Joined
- Apr 14, 2011
- Messages
- 758
I have a report that has a number of groups in it, with each group having its own On Format code. One of the groups is causing me some grief (although, it could be other groups also, and this is simply the first group that I have spotted it with!).
The code for the problematic group is as follows:
When the report runs, the second part of group does not display, which is the labels/fields AFTER the line "Cancel = IsNull(Me.txtStand12).
Now, here is the weird bit. If there is some data (a full stop is sufficient) in the first field of the next group, all of the above will display. OR, if I change the code to "Cancel=IsNull(Me.txtStand11), the data will display. :banghead:
Any ideas?
The code for the problematic group is as follows:
Code:
Private Sub GroupHeader6_Format(Cancel As Integer, FormatCount As Integer)
Cancel = IsNull(Me.txtStand11)
Me.lblAvail11.Visible = (Len(Me.txtAvail11 & vbNullString) > 0)
Me.lblOpRes11.Visible = (Len(Me.txtOpRes11 & vbNullString) > 0)
Me.lblMeal11.Visible = (Len(Me.txtMeal11 & vbNullString) > 0)
Me.lblFerry11.Visible = (Len(Me.txtFerry11 & vbNullString) > 0)
Me.lblDisplay11.Visible = (Len(Me.txtDisplay11 & vbNullString) > 0)
Cancel = IsNull(Me.txtStand12)
Me.lblAvail12.Visible = (Len(Me.txtAvail12 & vbNullString) > 0)
Me.lblOpRes12.Visible = (Len(Me.txtOpRes12 & vbNullString) > 0)
Me.lblMeal12.Visible = (Len(Me.txtMeal12 & vbNullString) > 0)
Me.lblFerry12.Visible = (Len(Me.txtFerry12 & vbNullString) > 0)
Me.lblDisplay12.Visible = (Len(Me.txtDisplay12 & vbNullString) > 0)
End Sub
When the report runs, the second part of group does not display, which is the labels/fields AFTER the line "Cancel = IsNull(Me.txtStand12).
Now, here is the weird bit. If there is some data (a full stop is sufficient) in the first field of the next group, all of the above will display. OR, if I change the code to "Cancel=IsNull(Me.txtStand11), the data will display. :banghead:
Any ideas?