Results 1 to 3 of 3
  1. #1
    5 Star Lounger
    Join Date
    Nov 2001
    Location
    Toronto Canada
    Posts
    920
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Changing Calculated Field

    Fact of Life is that you cannot change a calculated field.

    Here is the scenario.

    The client sees a field which contains a calculation reflecting the final amount for a quotation ( txtFQ ) which for instance is $171.49.

    He would prefer that is was $175.00

    I
    Cheers,
    Andy

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

    Re: Changing Calculated Field

    You can make the text box unbound, i.e. clear its control source.
    Use code to populate the text box, for example in the On Current event of the form.
    If the outcome of the calculation depends on other controls on the form, you can use the After Update event of those controls to set the value of the text box. The user should be aware that if he/she overwrites the calculated value, then changes the value of one of the contributing controls, the text box will be filled with the result of the calculation again.

  3. #3
    5 Star Lounger
    Join Date
    Nov 2001
    Location
    Toronto Canada
    Posts
    920
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Changing Calculated Field

    Hans,

    Thanks for the quick reply. I had tried a variation on the "After Update" / "On Current" events approach, but am still running into a problem where it doesn't seem to work on the first record but does on subsequent ones. I'll have to pull the test data apart first to make sure I don't have something weird internalized. Will let you the final outcome when it happens,
    Cheers,
    Andy

Posting Permissions

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