Report Formatting: Hide Data

lsteffen

New member
Local time
Today, 11:15
Joined
Sep 6, 2007
Messages
9
Hello,

I have a report that lists scheduled and unscheduled work for our mechanics. I also have a summary at the end of the report that lists how many work orders were scheduled, how many hours were scheduled etc. I am also totalling their available hours. However, I would like the report to hide the available hours data box, lable box and circle box when the report lists the unscheduled work. Here is an example of my code, and it works, but only hides the data box. How do I get it to hide all three?

Thank you,
Liz
:confused:

Private Sub CoverAvHrsForUnschWork()

'// Hide Available Hours for Unscheduled Work //'

If Me![Mech_Scheduled] = "False" Then
Me![Available_Hours].Visible = False
End If

End Sub
 
Hello,

I have a report that lists scheduled and unscheduled work for our mechanics. I also have a summary at the end of the report that lists how many work orders were scheduled, how many hours were scheduled etc. I am also totalling their available hours. However, I would like the report to hide the available hours data box, lable box and circle box when the report lists the unscheduled work. Here is an example of my code, and it works, but only hides the data box. How do I get it to hide all three?

Thank you,
Liz
:confused:

Private Sub CoverAvHrsForUnschWork()

'// Hide Available Hours for Unscheduled Work //'

If Me![Mech_Scheduled] = "False" Then
Me![Available_Hours].Visible = False
End If

End Sub

After doing more research, I have updated the code to the following, but it still does not work.

Private Sub GroupHeader1_Format(Cancel As Integer, FormatCount As Integer)

'// Hide Available Hours for Unscheduled Work //'

If Nz(Me.Section(acGroupLevel2Header).Controls("Mech_Scheduled"), "") = "No" Then
Me![Available_Hours].Visible = False
Else
Me![Available_Hours].Visible = True
End If

End Sub
 

Users who are viewing this thread

Back
Top Bottom