G Guest Feb 19, 2004 #1 I would like to loop though all controls on a form to disable all of them. Anybody have the code to do this. I'm using Access 97.
I would like to loop though all controls on a form to disable all of them. Anybody have the code to do this. I'm using Access 97.
J Jason Feb 19, 2004 #2 -----Original Message----- I would like to loop though all controls on a form to Click to expand... disable all of them. Anybody have the code to do this. I'm using Access 97. . Click to expand... Dim Frm as Form, Ctl as Control Set Frm = Me For Each Ctl In Frm Ctl.Enabled = False Next Ctl Jason
-----Original Message----- I would like to loop though all controls on a form to Click to expand... disable all of them. Anybody have the code to do this. I'm using Access 97. . Click to expand... Dim Frm as Form, Ctl as Control Set Frm = Me For Each Ctl In Frm Ctl.Enabled = False Next Ctl Jason
M Marshall Barton Feb 19, 2004 #3 SHIPP said: I would like to loop though all controls on a form to disable all of them. Anybody have the code to do this. I'm using Access 97. Click to expand... Some controls can not be enabled/disabled so you either have to check the controls type or ignore the errors that occur. Here's one way: Dim ctl As Control On Error Resume Next For Each ctl in Me.Controls ctl.Enabled = False Next ctl
SHIPP said: I would like to loop though all controls on a form to disable all of them. Anybody have the code to do this. I'm using Access 97. Click to expand... Some controls can not be enabled/disabled so you either have to check the controls type or ignore the errors that occur. Here's one way: Dim ctl As Control On Error Resume Next For Each ctl in Me.Controls ctl.Enabled = False Next ctl