Re: how get calculated amount from form to underlaying table



You have a couple of options here,

1) store the exchange rate information, including the date it was in effect.
You could then use this to redo the calculation when necessary.

2) store the calculated value.

To store the calculated value, create a hidden textbox bound to the field
you want to store the value in. In the form's BeforeUpdate event, copy the
value from the calculated textbox to the hidden textbox. This value will now
be stored in the table when the record is saved.

There is another potential problem, what will you do when you review the
records? Do you use a different form that will have a textbox bound to the
field you stored the calculated value in?

--
Wayne Morgan
MS Access MVP


"slowuptake" <slowuptake@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:6FDD38C1-0A07-4930-B27B-644373116763@xxxxxxxxxxxxxxxx
>I have employee expense database. Due large amounts foreign travel, want
>to
> add foreign currency capacity into the expense input form - and record
> into
> the underlaying table both the original amount and currency and the amount
> in
> base currency.
>
> Foreign currency amount entered by way of text box - no problems.
>
> Combo box allows user to choose which foreign currency from a list - no
> problems.
>
> List box looks up current exchange rate based on combo box choice - no
> problems.
>
> A separate text box calculates and displays the amount in my base
> currency -
> no problems.
>
> Problem - I can't figure out how to get calculated amount to be
> automatically written into underlaying database. As temporary solution I
> now
> manually retype the result from last text box.
>
> I suspect the problem isn't that hard, but as usual, I'm ... slowuptake
>


.



Relevant Pages

  • Re: how get calculated amount from form to underlaying table
    ... What I want to do is run a query based on the main form's ysn and txt fields ... You could then use this to redo the calculation when necessary. ... the underlaying table both the original amount and currency and the amount ... Foreign currency amount entered by way of text box - no problems. ...
    (microsoft.public.access.forms)
  • Re: how get calculated amount from form to underlaying table
    ... What I want to do is run a query based on the main form's ysn and txt fields ... You could then use this to redo the calculation when necessary. ... the underlaying table both the original amount and currency and the amount ... Foreign currency amount entered by way of text box - no problems. ...
    (microsoft.public.access.forms)
  • Re: how get calculated amount from form to underlaying table
    ... So I created a FutureDates Lookup Table. ... You could then use this to redo the calculation when necessary. ... the underlaying table both the original amount and currency and the amount ... Foreign currency amount entered by way of text box - no problems. ...
    (microsoft.public.access.forms)
  • Re: how get calculated amount from form to underlaying table
    ... So I created a FutureDates Lookup Table. ... You could then use this to redo the calculation when necessary. ... the underlaying table both the original amount and currency and the amount ... Foreign currency amount entered by way of text box - no problems. ...
    (microsoft.public.access.forms)
  • Re: how get calculated amount from form to underlaying table
    ... I need to store that value on the MAIN form. ... You could then use this to redo the calculation when necessary. ... the underlaying table both the original amount and currency and the amount ... Foreign currency amount entered by way of text box - no problems. ...
    (microsoft.public.access.forms)