Refering to fields on master from from subform

  • Thread starter Thread starter magmike
  • Start date Start date
M

magmike

I have a text box on a subform, that I am using an IIf statement in,
so that if the field ([IUSA]) on the parent form Is Null, returns "No
data for this record", else returns "IUSA Data" as a caption.

The code:
=IIf([Form].[ProspectForm].[IUSA] Is Null,"RefUSA record not
connected","RefUSA Data")

Am I referring to the field on the parent form (ProspectForm)
incorrectly, because it isn't working? It returns #Name?

thanks in advance!

magmike
 
Where you have form, it should be forms:
=IIf([Forms].[ProspectForm].[IUSA] Is Null,"RefUSA record not
connected","RefUSA Data")

If that doesn't cure it, try this version:

=IIf(Me.Parent.[IUSA] Is Null,"RefUSA record not
connected","RefUSA Data")
--
Dave Hargis, Microsoft Access MVP


magmike said:
I have a text box on a subform, that I am using an IIf statement in,
so that if the field ([IUSA]) on the parent form Is Null, returns "No
data for this record", else returns "IUSA Data" as a caption.

The code:
=IIf([Form].[ProspectForm].[IUSA] Is Null,"RefUSA record not
connected","RefUSA Data")

Am I referring to the field on the parent form (ProspectForm)
incorrectly, because it isn't working? It returns #Name?

thanks in advance!

magmike
 
Where you have form, it should be forms:
=IIf([Forms].[ProspectForm].[IUSA] Is Null,"RefUSA record not
connected","RefUSA Data")

If that doesn't cure it, try this version:

=IIf(Me.Parent.[IUSA] Is Null,"RefUSA record not> connected","RefUSA Data")

--
Dave Hargis, Microsoft Access MVP



magmike said:
I have a text box on a subform, that I am using an IIf statement in,
so that if the field ([IUSA]) on the parent form Is Null, returns "No
data for this record", else returns "IUSA Data" as a caption.
The code:
=IIf([Form].[ProspectForm].[IUSA] Is Null,"RefUSA record not
connected","RefUSA Data")
Am I referring to the field on the parent form (ProspectForm)
incorrectly, because it isn't working? It returns #Name?
thanks in advance!
magmike- Hide quoted text -

- Show quoted text -

I see. Mistake was the missing letter. Thanks!
 
Back
Top