Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

disable text box in subform

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
i have a form named Customers and a sub form named Details and a combo box in subform named Combo1

How can i Disable the Combo1 By VBA Code?
thanks

 
Hi

Forms!Customers!Details!Combo1.Enabled = False

(You'll get an error if the combo has the focus so set the focus to something else beforehand.)

HTH
pjm
 
i set the focus to another control in the form but the error is : Can't move the focus to that control

why?
 
Is the subform visible at that time? Terry M. Hoey
 
What kind of control are you trying to set the focus to and what are its properties?

(It must be visible and enabled and not something like a label that can't get the focus.)

pjm
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top