1
votes

I have a main form Form_frmSaleand it contain a sub-form frmSale_subform.How can I "access" the fields in subform

For e.g with no subform i would do Sale_Date.Enabled = True

What code should i put if i want to control subform fields from main form(Suppose Sale_Dateis in a subform

I tried the following but its not working

Me.frmSale_subform.Sale_Date.Enabled = True

frmSale_subform.Sale_Date.Enabled = True
1

1 Answers

1
votes

One way you should be able to do that is using:

Me.frmSale_subform.Controls("Sale_Date").Enabled = True

If that doesn't suite your fancy you can also reference http://access.mvps.org/access/forms/frm0031.htm for other ways to do it.