value from one subform to another subform

G

Guest

Hello!

I have on a form many subforms. I wolud like to get a value from one subform
to another subform. In the first subform in the Control Source I have choosen
a value from second subform. But when I go to the View of main form I get a
blank value. If I try to get the same value from second subform on a main
form by choosing that value on Control Source the system works fine.
Any ideas?

Miran
 
G

Guest

How did you refer to that text box that you want to get the value from?

Forms![MainForm]![Sub From1 control name].Form![Text Box Name]
 
G

Guest

Thanks, but I`ve allready written that. On the main form it works, but on the
second subform it doesn`t.

I`ve on the first subform many records and one that displays max value of
that records. I would like to get that max value on the second subform.

Miran


"Ofer Cohen" je napisal:
How did you refer to that text box that you want to get the value from?

Forms![MainForm]![Sub From1 control name].Form![Text Box Name]

--
Good Luck
BS"D


Miran said:
Hello!

I have on a form many subforms. I wolud like to get a value from one subform
to another subform. In the first subform in the Control Source I have choosen
a value from second subform. But when I go to the View of main form I get a
blank value. If I try to get the same value from second subform on a main
form by choosing that value on Control Source the system works fine.
Any ideas?

Miran
 
G

Guest

Yes, it works, but I when I change the value on the first subform I have to
close the form and then again open it to refresh the second subform. I would
like that the second subform be refreshed every time when I change the walue
on the first subform without reopen the main form.

I`he noticed that the value on the main form refresh as soon as I change the
value on the first subform.

Solution?
Miran



"Miran" je napisal:
Thanks, but I`ve allready written that. On the main form it works, but on the
second subform it doesn`t.

I`ve on the first subform many records and one that displays max value of
that records. I would like to get that max value on the second subform.

Miran


"Ofer Cohen" je napisal:
How did you refer to that text box that you want to get the value from?

Forms![MainForm]![Sub From1 control name].Form![Text Box Name]

--
Good Luck
BS"D


Miran said:
Hello!

I have on a form many subforms. I wolud like to get a value from one subform
to another subform. In the first subform in the Control Source I have choosen
a value from second subform. But when I go to the View of main form I get a
blank value. If I try to get the same value from second subform on a main
form by choosing that value on Control Source the system works fine.
Any ideas?

Miran
 
G

Guest

On the After Update evet of the relevant text box in the first sub form you
can refresh the second subform or the text box within it

Me.Parent[SecondSubFormControlName].Requery

Or
Me.Parent[SecondSubFormControlName].Form![TextBoxName].Requery

--
Good Luck
BS"D


Miran said:
Yes, it works, but I when I change the value on the first subform I have to
close the form and then again open it to refresh the second subform. I would
like that the second subform be refreshed every time when I change the walue
on the first subform without reopen the main form.

I`he noticed that the value on the main form refresh as soon as I change the
value on the first subform.

Solution?
Miran



"Miran" je napisal:
Thanks, but I`ve allready written that. On the main form it works, but on the
second subform it doesn`t.

I`ve on the first subform many records and one that displays max value of
that records. I would like to get that max value on the second subform.

Miran


"Ofer Cohen" je napisal:
How did you refer to that text box that you want to get the value from?

Forms![MainForm]![Sub From1 control name].Form![Text Box Name]

--
Good Luck
BS"D


:

Hello!

I have on a form many subforms. I wolud like to get a value from one subform
to another subform. In the first subform in the Control Source I have choosen
a value from second subform. But when I go to the View of main form I get a
blank value. If I try to get the same value from second subform on a main
form by choosing that value on Control Source the system works fine.
Any ideas?

Miran
 
G

Guest

Sorry, I forgot the . After the Parent

On the After Update evet of the relevant text box in the first sub form you
can refresh the second subform or the text box within it

Me.Parent.[SecondSubFormControlName].Requery

Or
Me.Parent.[SecondSubFormControlName].Form![TextBoxName].Requery

--
Good Luck
BS"D


Miran said:
Yes, it works, but I when I change the value on the first subform I have to
close the form and then again open it to refresh the second subform. I would
like that the second subform be refreshed every time when I change the walue
on the first subform without reopen the main form.

I`he noticed that the value on the main form refresh as soon as I change the
value on the first subform.

Solution?
Miran



"Miran" je napisal:
Thanks, but I`ve allready written that. On the main form it works, but on the
second subform it doesn`t.

I`ve on the first subform many records and one that displays max value of
that records. I would like to get that max value on the second subform.

Miran


"Ofer Cohen" je napisal:
How did you refer to that text box that you want to get the value from?

Forms![MainForm]![Sub From1 control name].Form![Text Box Name]

--
Good Luck
BS"D


:

Hello!

I have on a form many subforms. I wolud like to get a value from one subform
to another subform. In the first subform in the Control Source I have choosen
a value from second subform. But when I go to the View of main form I get a
blank value. If I try to get the same value from second subform on a main
form by choosing that value on Control Source the system works fine.
Any ideas?

Miran
 

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