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 Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Combo box and disabled fields.

Status
Not open for further replies.

HGoodloe

Programmer
Sep 4, 2008
53
US
I need some assistance with a combo box

I have a combo box that looks up the values in a table or query.

I am using a main form with a subform. The combo box is on the main form. The combo box works fine other than when the main form first opens, I want all the fields in the subform to be disabled, and that seems to be working ok.

However, when selecting a value from the combo box to display all associated records with that value in the subform, I also want the disabled fields to also become enabled. That’s where I’m having my problem.

How do I code the combo box in the main form to enable the disabled fields in the subform?

Can anyone help me with this?
 
It depends on how you disabled the fields. I generally prefer to set the locked property of the subform control, or the various Allow Edits/Additions/Deletions properties of the subform when I wish to disable all controls. The afterupdate event of the subform can then be used to change these properties.
 
Hello, I followed your suggestion. I set the Allow Edits/Additions/Deletions properties of the subform and that worked just fine.

However, the problem still remains with the Combo box. When selection a value from the combo box, all the controls in the subform are supposed to become enabled.

I still need to know how to code the combo box to enabled all fields in the subform.
 
You can use the After Update evnt of the combobox:

Me.[Subform Control Name].Form.AllowEdits=True


I do not quite understand your comment "I never received your reply.". What does it mean?
 
Thanks for your help. In regards to the comment, I thought I was replying or speaking to someone else.

I received an email message from tek-tips indicating that someone had responded to my question concerning the combo box issue.

When clicking on the link to see who it was that responded to my question, there was nothing there. So that's what that comment was in reference to.
 
FYI, I've asked the management to delete your duplicate thread on the very same topic.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top