problem with subform

  • Thread starter Thread starter Rick B
  • Start date Start date
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
 
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.
 
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
 
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
 
Back
Top