Results 1 to 3 of 3
  1. #1
    2 Star Lounger
    Join Date
    Jun 2003
    Location
    Indiana, USA
    Posts
    141
    Thanks
    2
    Thanked 0 Times in 0 Posts
    My [MainForm] has [SubForm1] that has the following summed field hidden in the footer: =Sum([Cost])

    I am pulling this value up to the [MainForm] via: =(SubForm1].[Form]![SumCost]) This field is a "currency" field.

    The value transfers fine until I have a record with no underlying records. In essence, there is not always a related record in my subform - some main records do not require use of a related 'subrecord'. In these instances, I get a the dreaded #Error value displayed. I understand why I am getting it, because there is no related subrecords. I have tried to use the Nz value but I know this is not correct, since there is no value of "0".

    Is there some other method of tricking the system show the #Error message does not display? I tried to setting the default value in the field to 0, but that did not work either.

    Thanks in advance for any assistance.

  2. #2
    Gold Lounger
    Join Date
    Feb 2001
    Location
    Sint Niklaas, Belgium
    Posts
    2,778
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Use the following formula :
    =IIf(IsError([SubForm1].[Form]![SumCost]),0, [SubForm1].[Form]![SumCost])
    Francois

  3. #3
    2 Star Lounger
    Join Date
    Jun 2003
    Location
    Indiana, USA
    Posts
    141
    Thanks
    2
    Thanked 0 Times in 0 Posts
    Thanks Francis. I never considered the IsError operator for this issue.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •