Calculate in a subform's textbox

  • Thread starter Arvin Villodres
  • Start date
A

Arvin Villodres

Good day to everyone!

I have an existing subform named "subfrmCV". What I need
to do
is when I double-click on the field of that subform which
is named
Debit another form opens, frmCompute. If I type this on a
textbox of
that newly opened form "123 + 4", it would reflect the
output "127"
on the same textbox and if I click the "ok" button of that
form the
value "127" will be reflected on the field/textbox "Debit"
of the
opened subform.

All I can do is to reflect the value 127 in the opened
form by using
the Eval() function. But I no longer know how to transfer
that value
in the still-opened subform.

I would really appreciate your help on this one.

Thanks.
 
W

Wayne Morgan

To refer to a control on the subform of another form:

Forms!NameOfOtherForm!NameOfSubformControl.Form!NameOfControlOnSubform

The NameOfSubformControl is the name of the control on the main form that holds the
subform, not the name of the subform itself (although it may turn out that they are the
same).

To get the name of the subform control, open the main form in design mode and open the
Properties sheet. Click on the subform ONE time and the Properties sheet should show the
name of the subform control. If you click on the subform more than once, you'll be in the
subform and the Properties sheet will show the name of the subform, not the control
holding it.
 
A

Arvin Villodres

I'm sorry but this hasn't solved my problem yet.
-----Original Message-----
To refer to a control on the subform of another form:

Forms!NameOfOtherForm!NameOfSubformControl.Form! NameOfControlOnSubform

The NameOfSubformControl is the name of the control on the main form that holds the
subform, not the name of the subform itself (although it may turn out that they are the
same).

To get the name of the subform control, open the main
form in design mode and open the
Properties sheet. Click on the subform ONE time and the
Properties sheet should show the
name of the subform control. If you click on the subform
more than once, you'll be in the
 
W

Wayne Morgan

To transfer the value you need to set the value of the textbox on the other form equal to
the value of the textbox on this form using the syntax given. If you need something more,
please be more specific.
 

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