G
Guest
Hello:
I need to evaluate a series of statements to determine whether to hide
tabs on a form. Orginally I placed the following code in the Form's load
event.
If DLookup("CustSpecs_Present", "CustSpecs", "CustSpecs_RoomID=11
And CustSpecs_Present = 1 And CustSpecs_CustID = " & Me.Header_CustID
& " And CustSpecs_PlanID = " & Me.Header_PlanID) Then
Me.Page1.Visible = True
Else
Me.Page1.Visible = False
End If
This code works without a problem. However, I need to evaluate a series of
conditions which are not dependent upon one another. I was advised to use a
case select statement. I constructed the following code
Select Case
Case 1
DLookup("CustSpecs_Present", "CustSpecs", "CustSpecs_RoomID=11
And CustSpecs_Present = 1 And CustSpecs_CustID = " & Me.Header_CustID
& " And CustSpecs_PlanID = " & Me.Header_PlanID) = Me.Page1.Visible = True
The code doesn't return an error but it doesn't work.
How should I structure this so it works?
Thanks
Brennan
I need to evaluate a series of statements to determine whether to hide
tabs on a form. Orginally I placed the following code in the Form's load
event.
If DLookup("CustSpecs_Present", "CustSpecs", "CustSpecs_RoomID=11
And CustSpecs_Present = 1 And CustSpecs_CustID = " & Me.Header_CustID
& " And CustSpecs_PlanID = " & Me.Header_PlanID) Then
Me.Page1.Visible = True
Else
Me.Page1.Visible = False
End If
This code works without a problem. However, I need to evaluate a series of
conditions which are not dependent upon one another. I was advised to use a
case select statement. I constructed the following code
Select Case
Case 1
DLookup("CustSpecs_Present", "CustSpecs", "CustSpecs_RoomID=11
And CustSpecs_Present = 1 And CustSpecs_CustID = " & Me.Header_CustID
& " And CustSpecs_PlanID = " & Me.Header_PlanID) = Me.Page1.Visible = True
The code doesn't return an error but it doesn't work.
How should I structure this so it works?
Thanks
Brennan