Results 1 to 7 of 7
  1. #1
    5 Star Lounger
    Join Date
    Jan 2001
    Location
    austin, Texas, USA
    Posts
    1,029
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Saving Calculate Fields in a Form (Access 2k, Win 2K Pro)

    In the course of developing a project, I made a decision... rather than setup form field calculations in the underlying query to a form, I put the calculated fields in the form itself. It's easier to maintain calculated fields in a form (IMHO) than in a query, so I'm happy with that. HOWEVER! I just noticed that the calculated field values don't get saved anywhere. Is there an easy way to get this to happen or do I have to do some recordset UPDATE stuff in the background at some point? Is there a best practices for doing this sort of thing? If re-doing the calculated fields in the query is the easiest thing to do, I suppose I will do that, but I'd rather not...

    TIA
    <img src=/S/compute.gif border=0 alt=compute width=40 height=20>

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

    Re: Saving Calculate Fields in a Form (Access 2k, Win 2K Pro)

    Why would you need to store the calculated values? Unless you need to save historical values, storing calculated values in a table is redundant.

  3. #3
    5 Star Lounger
    Join Date
    Jan 2001
    Location
    austin, Texas, USA
    Posts
    1,029
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Saving Calculate Fields in a Form (Access 2k,

    well, I suppose to run queries and reports incorporating the calculated values. Otherwise, just re-created the calculations on setitng up a report, yes? I get what you're saying about it being redundant (in the sense that the values can be derived), but I wanted an easy way to maintain the formulas and doing it on the form rather than in the query is a bit easier, given the way the query layout works. Looks like I'll have to set up the calculations in the query if I want the field info to be available in other places than the form. guess i was just trying to make things really easy for myself...

    thanks anyway!

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

    Re: Saving Calculate Fields in a Form (Access 2k,

    If you need the result of the calculations in different places, then you should use calculated fields in queries. I don't see why that would be more complicated than having calculated controls in a form.

  5. #5
    5 Star Lounger
    Join Date
    Jan 2001
    Location
    austin, Texas, USA
    Posts
    1,029
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Saving Calculate Fields in a Form (Access 2k,

    yeah, that's what i did. the reason why i feel it's a easy to maintain calcs in a form is, in query view you have to resize the column to work on it. just being reeeeaallly lazy.

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

    Re: Saving Calculate Fields in a Form (Access 2k,

    You can use the Expression Builder or Zoom window to edit an expression more easily. Both are available from the right-click menu for the Field row; you can also press Ctrl+F2 for the Expression Builder or Shift+F2 for the Zoom window.

  7. #7
    5 Star Lounger
    Join Date
    Jan 2001
    Location
    austin, Texas, USA
    Posts
    1,029
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Saving Calculate Fields in a Form (Access 2k,

    i keep forgetting about the zoom option... have to keep that in mind.

Posting Permissions

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