Results 1 to 5 of 5

Thread: Help

  1. #1
    3 Star Lounger
    Join Date
    Jan 2001
    Posts
    294
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Help

    I use this code =(Count[track]) on a field on a subform. This gives me a total of the track field. Works great.. The problem is the dept. I'm doing this for wants that value stored on the main form field field called [Trackmain].. Is there a way to paste or have that value automatically fill the main form field?
    Thanks..

  2. #2
    Plutonium Lounger
    Join Date
    Dec 2000
    Location
    Sacramento, California, USA
    Posts
    16,775
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Help

    First find out why they want to store the result. The usual rule of thumb is that you don't store anything you can recalculate on the fly.
    Charlotte

  3. #3
    3 Star Lounger
    Join Date
    Jan 2001
    Posts
    294
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Help

    They want to store this in the underlying table of the form.. The form is generated from the table called Tracking data. The field they want to store it in is called. [Trackmain].. I'm not sure what they want to do with it at this point. They've been very vague. I just know they want to populate the field on the form and that form is part of the underlying table. I hope this helps Charlottle..

  4. #4
    Uranium Lounger
    Join Date
    Jan 2001
    Location
    South Carolina, USA
    Posts
    7,295
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Help

    Storing a value in a table that is calculated from other database values is a very bad idea, and a major source of inaccurate results. If someone uses table view rather than the form to change the values it is calculated from, or add or delete records, then the calculated value stored in the table is wrong. If you always recalculate it, it will be correct.
    Legare Coleman

  5. #5
    PatriciaWilliams
    Guest

    Re: Help

    I agree with everyone who's "spoken," but you can create a field in the table and, in the main form, create an "on current" event that references the calculation in your subform (using the convoluted way that Access uses to refer to fields in subforms) and to update a control that you put on your mainform, bound to that field. Or, you can have an after action event in the calculated field of the subform, that reference the "parent!the_field." Or, you can make it less automatic, and put a button on either form that will update the field in the main form when you chose.
    thx
    Pat

Posting Permissions

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