See below and let me know if you have any ideas. Thanks!
________________________________
Hello fellow VBA programmers,
I have the code below in one database to do stuff to all the textboxes on a form. I've copied it into another DB to disable some combo boxes on a form, but it doesn't want to work on the combo box controls. I get a "Type Mismatch" error each time it hits the 'Next cbo' line. And it also does not disable the control.
Any ideas welcome and appreciated!
____________________________________________
CODE:
________________________________
Hello fellow VBA programmers,
I have the code below in one database to do stuff to all the textboxes on a form. I've copied it into another DB to disable some combo boxes on a form, but it doesn't want to work on the combo box controls. I get a "Type Mismatch" error each time it hits the 'Next cbo' line. And it also does not disable the control.
Any ideas welcome and appreciated!
____________________________________________
CODE:
Code:
Private Sub Form_Load()
Dim cbo As ComboBox
For Each cbo In Forms(frm).Controls
If Not IsNull(cbo.Value) Then
ctl.Enabled = False
Else
ctl.Enabled = True
End If
Next cbo
End Sub