Happy New Year everyone.
I have the following subroutine in a VAB module and it works with no problem.
Public Sub HideUnhide(ByVal blnHidUnhide as Boolean, strPage AS String)
For Each ctl In Forms!frmMyForm!("TabCtl12").Pages(strpage).Controls
Select Case ctl.ControlType
Case acCommandButton
If blnhidunhide Then
ctl.visible = false
else
ctl.visible = true
end if
End Select
Next
What I need to do is to make this a generic routine where I can pass in the form name as part of the call.
I think it would be something like this but I'm not sure.
Public Sub HideUnhide(ByVal blnHidUnhide as Boolean, strPage AS String, frmForm as form)
For Each ctl In Forms!frmForm!("TabCtl12").Pages(strpage).Controls
I've tried a couple of different variations of the above and I can't seem to get the syntax right.
Could someone pleawe point me in the right direction?
Thanks
I have the following subroutine in a VAB module and it works with no problem.
Public Sub HideUnhide(ByVal blnHidUnhide as Boolean, strPage AS String)
For Each ctl In Forms!frmMyForm!("TabCtl12").Pages(strpage).Controls
Select Case ctl.ControlType
Case acCommandButton
If blnhidunhide Then
ctl.visible = false
else
ctl.visible = true
end if
End Select
Next
What I need to do is to make this a generic routine where I can pass in the form name as part of the call.
I think it would be something like this but I'm not sure.
Public Sub HideUnhide(ByVal blnHidUnhide as Boolean, strPage AS String, frmForm as form)
For Each ctl In Forms!frmForm!("TabCtl12").Pages(strpage).Controls
I've tried a couple of different variations of the above and I can't seem to get the syntax right.
Could someone pleawe point me in the right direction?
Thanks