C
Chris
Hello All.
I am using the tab control with 5 tabs and one subform on each tab. When
the user is using ther system I have locked all the controls so that he/she
does not accidently edit them. I have added an "edit" button to enable the
records.
on clicking the edit buitton I can unlock the controls on one subform but I
do not know how to unlock all the controls on all the subforms
Forms!FrmPersonalD.frmMainApp.Form!txttest.SetFocus
' I think it is the following line that needs to be changed
For Each ctl In Forms!FrmPersonalD.frmMainApp.Controls
Select Case ctl.ControlType
Case acComboBox, acListBox, acTextBox
If (ctl.Name <> "txtTest") Then
ctl.Locked = Not ctl.Locked
' toggling the visible property
End If
Case acSubform
End Select
Next ctl
Please help
I am using the tab control with 5 tabs and one subform on each tab. When
the user is using ther system I have locked all the controls so that he/she
does not accidently edit them. I have added an "edit" button to enable the
records.
on clicking the edit buitton I can unlock the controls on one subform but I
do not know how to unlock all the controls on all the subforms
Forms!FrmPersonalD.frmMainApp.Form!txttest.SetFocus
' I think it is the following line that needs to be changed
For Each ctl In Forms!FrmPersonalD.frmMainApp.Controls
Select Case ctl.ControlType
Case acComboBox, acListBox, acTextBox
If (ctl.Name <> "txtTest") Then
ctl.Locked = Not ctl.Locked
' toggling the visible property
End If
Case acSubform
End Select
Next ctl
Please help