problem with subform

R

Rick B

I have two forms, let's say:

frmMain
frmSubform

frmSubform is a sub form in frmMain. The subform is viewd in continous form
format. In addition, I also have a text box (txtTotal) on the subform which
totals a specific field on the subform.

My problem is that I need to reference this text box value on frmMain. I
thought the following would work but I get the #NAME? error:

text box on frmMain to get value of txtTotal from frmSubform
=[Forms]![frmSubform]![txtTotal]

I am wondering what the best way to go about this would be?

Thank you in advance,

-rick
 
J

Jeff Conrad

I have something exactly like this on several forms.
This works for me (adjusted to your example).

=Nz([frmSubform].[Form]![txtTotal])

The Nz part is optional.
 
R

Rick B

Thank you very much......that worked perfectly.

-rick


Jeff Conrad said:
I have something exactly like this on several forms.
This works for me (adjusted to your example).

=Nz([frmSubform].[Form]![txtTotal])

The Nz part is optional.

--
Jeff Conrad
Access Junkie
Bend, Oregon

I have two forms, let's say:

frmMain
frmSubform

frmSubform is a sub form in frmMain. The subform is viewd in continous form
format. In addition, I also have a text box (txtTotal) on the subform which
totals a specific field on the subform.

My problem is that I need to reference this text box value on frmMain. I
thought the following would work but I get the #NAME? error:

text box on frmMain to get value of txtTotal from frmSubform
=[Forms]![frmSubform]![txtTotal]

I am wondering what the best way to go about this would be?

Thank you in advance,

-rick
 
J

Jeff Conrad

You're welcome, glad to help.

--
Jeff Conrad
Access Junkie
Bend, Oregon

Rick B said:
Thank you very much......that worked perfectly.

-rick


Jeff Conrad said:
I have something exactly like this on several forms.
This works for me (adjusted to your example).

=Nz([frmSubform].[Form]![txtTotal])

The Nz part is optional.

--
Jeff Conrad
Access Junkie
Bend, Oregon

I have two forms, let's say:

frmMain
frmSubform

frmSubform is a sub form in frmMain. The subform is viewd in continous form
format. In addition, I also have a text box (txtTotal) on the subform which
totals a specific field on the subform.

My problem is that I need to reference this text box value on frmMain. I
thought the following would work but I get the #NAME? error:

text box on frmMain to get value of txtTotal from frmSubform
=[Forms]![frmSubform]![txtTotal]

I am wondering what the best way to go about this would be?

Thank you in advance,

-rick
 

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