Field Value error

  • Thread starter Thread starter LJG
  • Start date Start date
L

LJG

Hi Guys,

I have this field source in a database report, it picks this up fine on a
form but when it's used as part of a report it fails?

=IIf([rptQuote_EFT].[Report].[HasData],[rptQuote_EFT]![txtEFT_total],0)

This work fine in a a2002 version ye not in a2003 !!

Any suggestions please
 
LJG said:
I have this field source in a database report, it picks this up fine on a
form but when it's used as part of a report it fails?

=IIf([rptQuote_EFT].[Report].[HasData],[rptQuote_EFT]![txtEFT_total],0)

This work fine in a a2002 version ye not in a2003 !!


A2003 is more rigorous about sloppy syntax than A2002. I'm
surprised that it worked in a form. You need to use the
subform/subreport control's Form/Report property.

Assuming your names are all correct, try this:

=IIf([rptQuote_EFT].[Report].[HasData],[rptQuote_EFT].Report![txtEFT_total],0)
 
Cheers, Thanks for that Marshall,

That has fixed it, although I did not realise it was sloppy code...it has
worked for over 2 years and have only just upgraded to a2003

Regards
Les



Marshall Barton said:
LJG said:
I have this field source in a database report, it picks this up fine on a
form but when it's used as part of a report it fails?

=IIf([rptQuote_EFT].[Report].[HasData],[rptQuote_EFT]![txtEFT_total],0)

This work fine in a a2002 version ye not in a2003 !!


A2003 is more rigorous about sloppy syntax than A2002. I'm
surprised that it worked in a form. You need to use the
subform/subreport control's Form/Report property.

Assuming your names are all correct, try this:

=IIf([rptQuote_EFT].[Report].[HasData],[rptQuote_EFT].Report![txtEFT_total],0)
 
Well, maybe sloppy isn't the right word. However, regarless
of how many versions permitted it, it has always been a
least a little odd that a control in a form could be
referenced as a property of its containing subform coltrol.

You are far and away not the first person to run into this.
Too bad you had to learn about it the hard way, but you
probably won't forget it now ;-)
--
Marsh
MVP [MS Access]

That has fixed it, although I did not realise it was sloppy code...it has
worked for over 2 years and have only just upgraded to a2003


"Marshall Barton" wrote
LJG said:
I have this field source in a database report, it picks this up fine on a
form but when it's used as part of a report it fails?

=IIf([rptQuote_EFT].[Report].[HasData],[rptQuote_EFT]![txtEFT_total],0)

This work fine in a a2002 version ye not in a2003 !!


A2003 is more rigorous about sloppy syntax than A2002. I'm
surprised that it worked in a form. You need to use the
subform/subreport control's Form/Report property.

Assuming your names are all correct, try this:

=IIf([rptQuote_EFT].[Report].[HasData],[rptQuote_EFT].Report![txtEFT_total],0)
 
Back
Top