Conversely you can call a subroutine...
 
Sub EnableComboBoxes(fblnState as boolean)
       me.cboBox1.enabled = fblnState
       me.cboBox2.enabled = fblnState
       me.cboBox3.enabled = fblnState
       me.cboBox4.enabled = fblnState
End Sub

Then all you have to do is call
 
Call EnableComboBoxes(True)
--- or ----
Call EnableComboBoxes(False)
 
Sort of self documenting code
--- On Fri, 1/2/09, Joe <[email protected]> wrote:

From: Joe <[email protected]>
Subject: [Access VBA Central] Enable / Disable all Combo Boxes
To: [email protected]
Date: Friday, January 2, 2009, 3:55 PM






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!!!

 














      

[Non-text portions of this message have been removed]

Reply via email to