tab control subform change value

G

Guest

I have a form with a Tab control. The Tab control is a collection of
subforms. On the main form is a combo box. I would like to set the Addrecords
to true or false and the visiability of a button on a subform of the Tab
control based on the whether there is a record in the table linked to the
subform that correspons to the value in the combo box of the main form. After
Update of the combo box I requery the subform me.subform.requery successfully
, but am unable to set the addrecords and button.visible. Tried
forms!tabcntl("Subformname").forms.allowadditions=false and various
permutations; I susoect I don't have the right reference. Have tried to set
it successfully on click of a field on the subform, but need to click
there...hasn't worked on sub form current, ect. Any help would be appreciated.
 
A

Al Camp

Lou,
A subform on a Tab is no different than just a subform on a main form. The Tab is not
considered in the addressing.
Referring to subfrom from main...

Me.frmYourSubFormName.Form.AllowEdits = False
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top