How to set a combo box to be disable?

kobekaren

Registered User.
Local time
Tomorrow, 00:20
Joined
Jun 26, 2008
Messages
16
i want to set a combo box to be disable when the form is loaded.
after i click a "edit" button, the combo box should be enabled to edit !
 
Me.ComboName.Enabled = False ('disable the combo box)
Me.ComboName.Enabled = True ('enabled the combo box).
 
thank you for your reply !
but i have try this before , error message pop up !!
the message is about "run time error 438: object doesn't support this property or method"

i don't know how to do !
 
Send a short example of your db, (access 2000 or 2002).
 
can i do sth like this?

-->Me![ComboBoxName].Enabled = False
-->Me![ComboBoxName].BackColor = RGB(255,255,255)
 
What is the name of your Combo box (in NAME PROPERTIES) ???
 
Also, what event do you have Me.ComboName.Enabled = False in?
 
i have a combo box named "type" which is disable when the form is first loaded.
when i click a button "new", "type" should become enabled.

therefore, i built an On Click event on the "new" button which is like the following-->

Private Sub hardnew_Click()
Me.AllowAdditions = True
DoCmd.GoToRecord , , acNewRec
Me![type].Enabled = False
End Sub

can the above coding work?
 
Oh....i have found out the my stupid mistake already.
Thank you for all your help !!

Again, thank you all !!
 
Well, yeah! You have Me![type].Enabled = False when you want the the combobox enabled!

Also note that type is a Reserved Word in Access, and as such shouldn't be used as an object name! You need to change this to something else because sooner or later it's going to cause you grief! You can include type in the name, just don't use simply type.
 

Users who are viewing this thread

Back
Top Bottom