S
SF
Hi,
I have two functions which use to switch langauges (form labels on and off)
when a function is selected.
Public Function Language_Eng()
Dim frm As Form
Dim sfrm As SubForm
Dim ctl As Control
Dim ctls As Control
Set frm = Screen.ActiveForm.Form
For Each ctl In frm.Controls
If ctl.Tag = "k" Then
ctl.Visible = False
End If
If ctl.Tag = "e" Then
ctl.Visible = True
End If
Next ctl
End Function
Public Function Language_Khm()
Dim frm As Form
Dim sfrm As SubForm
Dim ctl As Control
Set frm = Screen.ActiveForm.Form
For Each ctl In frm.Controls
If ctl.Tag = "k" Then
ctl.Visible = True
End If
If ctl.Tag = "e" Then
ctl.Visible = False
End If
Next ctl
End Function
These two functions work fine for those form that do not have subform. How
do I add code to turn visibility of label on/off for a subform if present?
SF
I have two functions which use to switch langauges (form labels on and off)
when a function is selected.
Public Function Language_Eng()
Dim frm As Form
Dim sfrm As SubForm
Dim ctl As Control
Dim ctls As Control
Set frm = Screen.ActiveForm.Form
For Each ctl In frm.Controls
If ctl.Tag = "k" Then
ctl.Visible = False
End If
If ctl.Tag = "e" Then
ctl.Visible = True
End If
Next ctl
End Function
Public Function Language_Khm()
Dim frm As Form
Dim sfrm As SubForm
Dim ctl As Control
Set frm = Screen.ActiveForm.Form
For Each ctl In frm.Controls
If ctl.Tag = "k" Then
ctl.Visible = True
End If
If ctl.Tag = "e" Then
ctl.Visible = False
End If
Next ctl
End Function
These two functions work fine for those form that do not have subform. How
do I add code to turn visibility of label on/off for a subform if present?
SF