Results 1 to 4 of 4
  1. #1
    4 Star Lounger
    Join Date
    Aug 2001
    Location
    London, UK
    Posts
    516
    Thanks
    0
    Thanked 0 Times in 0 Posts

    calculate & store data in table/form/query (v2000)

    I Need to calculate the monthly contributing using the following conditions:
    If there is only a name in the Database name column they should only pay

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: calculate & store data in table/form/query (v2000)

    The standard answer to this is that you shouldn't store calculated information in a table, expcept in some special circumstances. If you store calculated information, you have no guarantee that it will stay up-to-date.

    Instead of calculating the contribution in a form, you can create a query with a calculated field

    Contribution:IIf([Database Name],2,0)+IIf([Associate],2,0)+IIf([Child1],1,0)+IIf([Child2],1,0)+IIf([Child3],1,0)+IIf([Child4],1,0)+IIf([Child5],1,0)

    You can use the query as record source for forms, reports etc.

    If really needed, you can use this calculated field in an update query to populate a Contribution field in te table (you must create this field in the table first)

  3. #3
    4 Star Lounger
    Join Date
    Aug 2001
    Location
    London, UK
    Posts
    516
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: calculate & store data in table/form/query (v2000)

    Thank you!
    <img src=/S/bow.gif border=0 alt=bow width=15 height=15>

  4. #4
    Gold Lounger
    Join Date
    Jun 2001
    Location
    Crystal Beach, FL, Florida, USA
    Posts
    3,436
    Thanks
    1
    Thanked 34 Times in 34 Posts

    Re: calculate & store data in table/form/query (v2000)

    This looks to me like you are suffering the consequences of a non-normalized database. Just based upon what you wrote, it looks like your 1st Child Field, 2nd Child Field, etc. should be individual records of a child table.
    Mark Liquorman
    See my website for Tips & Downloads and for my Liquorman Utilities.

Posting Permissions

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