Passing Variables from a Form to a Subform

K

Kindra

Hi all,

I am trying to create 1 form that includes a subform. I
want the ID Number and the Department Name to pass into
the subform from the form. I have created a module and
declared my variables in there.

I have event procedures in the actual form that will store
the information (after the user updates the text box) into
the variables. And I have an event procedure written for
the subform such that when one of the text boxes in the
subform has the focus, then the data in the variables
should update text boxes on the subform.

When I go to try to actually input data into my form and
then put the focus on the text box in my subform, it says
that there is no data in my variables. How can I correct
this?

Thanks,
Kindra
 
A

ALESSANDRO Baraldi

Kindra said:
Hi all,

I am trying to create 1 form that includes a subform. I
want the ID Number and the Department Name to pass into
the subform from the form. I have created a module and
declared my variables in there.

I have event procedures in the actual form that will store
the information (after the user updates the text box) into
the variables. And I have an event procedure written for
the subform such that when one of the text boxes in the
subform has the focus, then the data in the variables
should update text boxes on the subform.

When I go to try to actually input data into my form and
then put the focus on the text box in my subform, it says
that there is no data in my variables. How can I correct
this?

Thanks,
Kindra

You don't need of this metod.
If your Data are in Form's Controls you
can refere to it directly.

Try like this:
Put in Your SubForm Event Procedure this reference to return
the content of associated control......!

Me.Parent.Form.ControlName

Don't use the Value property because yuo can Retrive
error if the control have not the FOCUS....!!!

Bye.
@Alex(IT sorry for my ENGL....)
 

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