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

Subform cmd button

Status
Not open for further replies.

chew1920

Programmer
Jan 11, 2005
25
0
0
US
I have a main form and a subform, and on my subform I have a command button that I want to be disbaled unless a button on the main form is clicked. The only way that I have figured out so far is to disable the entire subform, which is not what I want to do. Can someone please point me in the right direction to enable or disable the subform cmd button based on the click of the main forms button.

Thanks
 
you should be able to disable just the cmd button of the subform. Simple if statement (subform.cmdbutton.enabled = false) or you can simply only show the command button only if the main forms button is clicked
 
Also have a look at this - it refers to how you reference a control in code that resides on a subform. As wshs says, you can go into the properties of the control you want to hide/disable by clicking on the control in design mode, and right click mouse to select properties. Visible or enabled properties can be set to true/false etc.


Regards
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top