GOrDySHEDHEAD
07-03-2007, 02:46 AM
Hello,
I have a problem, Basically i want to make label boxes visible or invisable depending on data from a number of tick boxes.
I open a report (based on a query)
I enter the parameter value
I have TWO(2) tick boxes (named, PC, MC)
Based on earlier data entry i want certain labels to appear:
In the On Event of the report i choose Activate and the following code has been used:
Private Sub Report_Activate()
If [PC] And [MC] = YES Then
[LBLSYSTEMC].Visible = True
[LBLPUMPC].Visible = False
[LBLMATTC].Visible = False
[LBLNOC].Visible = False
ElseIf [PC] = YES And [MC] = NO Then
[LBLSYSTEMC].Visible = False
[LBLPUMPC].Visible = True
[LBLMATTC].Visible = False
[LBLNOC].Visible = False
ElseIf [PC] = NO And [MC] = YES Then
[LBLSYSTEMC].Visible = False
[LBLPUMPC].Visible = False
[LBLMATTC].Visible = True
[LBLNOC].Visible = False
ElseIf [PC] = NO And [MC] = NO Then
[LBLSYSTEMC].Visible = False
[LBLPUMPC].Visible = False
[LBLMATTC].Visible = False
[LBLNOC].Visible = True
End If
End Sub
The problem is the code does not seem to be working, no errors show, and it seems to me like the code is none existant.
Any Help would be appreciated
I have a problem, Basically i want to make label boxes visible or invisable depending on data from a number of tick boxes.
I open a report (based on a query)
I enter the parameter value
I have TWO(2) tick boxes (named, PC, MC)
Based on earlier data entry i want certain labels to appear:
In the On Event of the report i choose Activate and the following code has been used:
Private Sub Report_Activate()
If [PC] And [MC] = YES Then
[LBLSYSTEMC].Visible = True
[LBLPUMPC].Visible = False
[LBLMATTC].Visible = False
[LBLNOC].Visible = False
ElseIf [PC] = YES And [MC] = NO Then
[LBLSYSTEMC].Visible = False
[LBLPUMPC].Visible = True
[LBLMATTC].Visible = False
[LBLNOC].Visible = False
ElseIf [PC] = NO And [MC] = YES Then
[LBLSYSTEMC].Visible = False
[LBLPUMPC].Visible = False
[LBLMATTC].Visible = True
[LBLNOC].Visible = False
ElseIf [PC] = NO And [MC] = NO Then
[LBLSYSTEMC].Visible = False
[LBLPUMPC].Visible = False
[LBLMATTC].Visible = False
[LBLNOC].Visible = True
End If
End Sub
The problem is the code does not seem to be working, no errors show, and it seems to me like the code is none existant.
Any Help would be appreciated