Sum in SubSubform #Error Message

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Andreas

    Sum in SubSubform #Error Message

    Hello together,

    I want to calculate a sum in subform from a subsubform (sounds
    complicated?) but I get an #error but... see below

    My database:
    I have a main form with members,
    each members has in a subform from 0-x projects (in the subform)
    each project can have from 0-x subprojects with working days.

    What I want:
    Now I want to calculate for each project (subform) the total number of
    working days.
    I calculated in the footer a unbound field to sum (=Sum([txtDays]),
    another in the subform which links to this one (=[Project subform].
    [Form]![txt_sumDays]).

    Problem:
    If I only open the subform it calculates the days. If I open the main
    form an #error message occures BUT if i click in the subform to the
    projects it calculates the days for each row I click?!?!? FURHTER if i
    open the subform in the datasheet view the #error message occurs as
    well.

    Thanks a lot for any suggestions!

    Cheers
    Andreas


  • AndyB via AccessMonster.com

    #2
    Re: Sum in SubSubform #Error Message

    Hi Andreas,

    The way I've got around this in the past is to address the record source of
    the unbound field on the subform from the main form.

    In your case this would look something like:

    =Forms![Main Form]![Project subform]![Sub Sub Form]![txt_sumDays]

    Andy

    Andreas wrote:
    >Hello together,
    >
    >I want to calculate a sum in subform from a subsubform (sounds
    >complicated? ) but I get an #error but... see below
    >
    >My database:
    >I have a main form with members,
    >each members has in a subform from 0-x projects (in the subform)
    >each project can have from 0-x subprojects with working days.
    >
    >What I want:
    >Now I want to calculate for each project (subform) the total number of
    >working days.
    >I calculated in the footer a unbound field to sum (=Sum([txtDays]),
    >another in the subform which links to this one (=[Project subform].
    >[Form]![txt_sumDays]).
    >
    >Problem:
    >If I only open the subform it calculates the days. If I open the main
    >form an #error message occures BUT if i click in the subform to the
    >projects it calculates the days for each row I click?!?!? FURHTER if i
    >open the subform in the datasheet view the #error message occurs as
    >well.
    >
    >Thanks a lot for any suggestions!
    >
    >Cheers
    >Andreas
    --
    Message posted via http://www.accessmonster.com

    Comment

    • Andreas

      #3
      Re: Sum in SubSubform #Error Message

      Hi Andy,

      thanks for the answer, but it doesnt work...
      =Forms![Main Form]![Project subform]![Sub Sub Form]![txt_sumDays]
      if I do it like that it will give me "#Name?"

      so I deleted [Main Form] (in My case [Members]), but then I have same
      same problem as before (#Error) calculates only when I click on the
      record in the subform.

      Andreas

      On 20 Feb., 15:40, "AndyB via AccessMonster.c om" <u41372@uwewrot e:
      Hi Andreas,
      >
      The way I've got around this in the past is to address the record source of
      the unbound field on the subform from the main form.
      >
      In your case this would look something like:
      >
      =Forms![Main Form]![Project subform]![Sub Sub Form]![txt_sumDays]
      >
      Andy
      >
      >
      >
      Andreas wrote:
      Hello together,
      >
      I want to calculate a sum in subform from a subsubform (sounds
      complicated?) but I get an #error but... see below
      >
      My database:
      I have a main form with members,
      each members has in a subform from 0-x projects (in the subform)
      each project can have from 0-x subprojects with working days.
      >
      What I want:
      Now I want to calculate for each project (subform) the total number of
      working days.
      I calculated in the footer a unbound field to sum (=Sum([txtDays]),
      another in the subform which links to this one (=[Project subform].
      [Form]![txt_sumDays]).
      >
      Problem:
      If I only open the subform it calculates the days. If I open the main
      form an #error message occures BUT if i click in the subform to the
      projects it calculates the days for each row I click?!?!? FURHTER if i
      open the subform in the datasheet view the #error message occurs as
      well.
      >
      Thanks a lot for any suggestions!
      >
      Cheers
      Andreas
      >
      --
      Message posted viahttp://www.accessmonst er.com

      Comment

      Working...