assign a value to a property on a subfprm

  • Thread starter Thread starter mcnews
  • Start date Start date
M

mcnews

i have a property called BIsSubForm declared as boolean on a form.
this form will be used as a stand alone form and as a subform.
when it is a subform i want to assign the mIsSubForm public variable
the True value.
how do i reference it from the on load method of the owner form.

tia,
mcnewsxop
 
if there is VBA code in your subform you can reference to it from the main
form like this :

Form_YourFormName.mIsSubForm.value = True

If there is no VBA code in the subform you can add something like this in
the OnLoad event :

dim x as byte

x = 1

Should do the trick!
 
i have a property called BIsSubForm declared as boolean on a form.
this form will be used as a stand alone form and as a subform.
when it is a subform i want to assign the mIsSubForm public variable
the True value.
how do i reference it from the on load method of the owner form.

tia,
mcnewsxop

i did it this way:

If Me.Parent.Name = "frmAddSpecimens" Then mIsSubForm = True
 
Back
Top