Hi
Is there a way of making a group of controls invisible? at the present time I am doing the following:-
e.g.
Public Sub HideSocial()
'Hide Social Items
Forms![FrmSchemes].ForecastGWh.Visible = False
Forms![FrmSchemes].ForecastppkWh.Visible = False
Forms![FrmSchemes].LabelGWhDelivered.Visible = False
Forms![FrmSchemes].GWhDeliveredLabel.Visible = False
Forms![FrmSchemes].LabelGWhBalance.Visible = False
Forms![FrmSchemes].GWhBox.Visible = False
Forms![FrmSchemes].GWhDelivered.Visible = False
Forms![FrmSchemes].GWhBalanceRemaining.Visible = False
Forms![FrmSchemes].ForecastNoofSocialMeasures.Visible = False
Forms![FrmSchemes].ForecastNoofMeasures.Visible = False
Forms![FrmSchemes].LabelUValueto045.Visible = False
Forms![FrmSchemes].ForecastNoofMeasures1.Visible = False
Forms![FrmSchemes].LabelUValueto037.Visible = False
Forms![FrmSchemes].ForecastNoofMeasures2.Visible = False
Forms![FrmSchemes].LabelUValueto035.Visible = False
Forms![FrmSchemes].FuelSwitchID.Visible = False
Forms![FrmSchemes].FuelSwitchID1.Visible = False
Forms![FrmSchemes].FuelSwitchID2.Visible = False
Forms![FrmSchemes].PG.Visible = False
Forms![FrmSchemes].TRV.Visible = False
Forms![FrmSchemes].ForecastTCO2.Visible = False
Forms![FrmSchemes].Forecast£tCO2.Visible = False
Forms![FrmSchemes].CustomerContribution.Visible = False
Forms![FrmSchemes].LabelAddNewInvoices.Visible = False
Forms![FrmSchemes].IDStatus.Visible = False
Forms![FrmSchemes].SocialSchemeDiscription.Visible = False
Forms![FrmSchemes].LabelTCO2Delivered.Visible = False
Forms![FrmSchemes].Box424.Visible = False
Forms![FrmSchemes].TCO2DeliveredLabel.Visible = False
Forms![FrmSchemes].LabelTCO2Balance.Visible = False
Forms![FrmSchemes].£ForecastValue.Visible = False
Forms![FrmSchemes].TCO2Delivered.Visible = False
Forms![FrmSchemes].TCO2BalanceRemaining.Visible = False
End Sub
So I call HideSocial and this runs this Public sub, is there a better/simpler way of doing this?
As background this example runs when the user makes a selection from a combo box, there are 12 diferent groups, the point is to make sure only the required controls are visible for the selection that has been made.
Many thanks neill
Is there a way of making a group of controls invisible? at the present time I am doing the following:-
e.g.
Public Sub HideSocial()
'Hide Social Items
Forms![FrmSchemes].ForecastGWh.Visible = False
Forms![FrmSchemes].ForecastppkWh.Visible = False
Forms![FrmSchemes].LabelGWhDelivered.Visible = False
Forms![FrmSchemes].GWhDeliveredLabel.Visible = False
Forms![FrmSchemes].LabelGWhBalance.Visible = False
Forms![FrmSchemes].GWhBox.Visible = False
Forms![FrmSchemes].GWhDelivered.Visible = False
Forms![FrmSchemes].GWhBalanceRemaining.Visible = False
Forms![FrmSchemes].ForecastNoofSocialMeasures.Visible = False
Forms![FrmSchemes].ForecastNoofMeasures.Visible = False
Forms![FrmSchemes].LabelUValueto045.Visible = False
Forms![FrmSchemes].ForecastNoofMeasures1.Visible = False
Forms![FrmSchemes].LabelUValueto037.Visible = False
Forms![FrmSchemes].ForecastNoofMeasures2.Visible = False
Forms![FrmSchemes].LabelUValueto035.Visible = False
Forms![FrmSchemes].FuelSwitchID.Visible = False
Forms![FrmSchemes].FuelSwitchID1.Visible = False
Forms![FrmSchemes].FuelSwitchID2.Visible = False
Forms![FrmSchemes].PG.Visible = False
Forms![FrmSchemes].TRV.Visible = False
Forms![FrmSchemes].ForecastTCO2.Visible = False
Forms![FrmSchemes].Forecast£tCO2.Visible = False
Forms![FrmSchemes].CustomerContribution.Visible = False
Forms![FrmSchemes].LabelAddNewInvoices.Visible = False
Forms![FrmSchemes].IDStatus.Visible = False
Forms![FrmSchemes].SocialSchemeDiscription.Visible = False
Forms![FrmSchemes].LabelTCO2Delivered.Visible = False
Forms![FrmSchemes].Box424.Visible = False
Forms![FrmSchemes].TCO2DeliveredLabel.Visible = False
Forms![FrmSchemes].LabelTCO2Balance.Visible = False
Forms![FrmSchemes].£ForecastValue.Visible = False
Forms![FrmSchemes].TCO2Delivered.Visible = False
Forms![FrmSchemes].TCO2BalanceRemaining.Visible = False
End Sub
So I call HideSocial and this runs this Public sub, is there a better/simpler way of doing this?
As background this example runs when the user makes a selection from a combo box, there are 12 diferent groups, the point is to make sure only the required controls are visible for the selection that has been made.
Many thanks neill