Try this:
(place this in a standard module)
Code:
Public Sub DisAbleSomeControls(pFrm As Form)
Dim i As Integer
Dim c As Control
Dim db As Database
Dim f As Form
Set db = CurrentDb
Set f = pFrm
For i = 0 To f.Controls.Count - 1
Set c = f.Controls(i) 'Grab a control
If TypeOf c Is ComboBox Or TypeOf c Is TextBox Then
With c
'Set Enabled property to False
.Enabled = False
End With
End If
Next
End Sub
Call it using:
Code:
Private Sub Command28_Click()
Call DisAbleSomeControls(Me)
End Sub
Sub Command28_Click is a button on my test form......