Try this

 Dim ctrl As Control
    
    For Each CTL In Form.Controls
        If TypeOf CTL Is TextBox Or TypeOf CTL Is ComboBox Then
           CTL.Enabled = False
        End If
    Next


For FREE Access ebook and videos click here
http://access-databases.com/ebook       




--- In [email protected], "Joe" <joefonsec...@...> wrote:
>
> Is there an easier way to enable all / disable all combo boxes and
> text boxes on a form.  
> 
> I have a button that is Save and Disable all combo / text boxes on a
> form.  And I have another button that enables them.
> 
> Currently i'm doing 
> Save button does
> me.cbobox1.enables = true
> me.cbobox2.enabled = true 
> etc.
> 
> 
> then 
> 
> Enable button does
> me.cbobox1.enables = false
> me.cbobox2.enabled = false
> etc.
> 
> 
> If you can help on this thanks!!!
>


Reply via email to