Re: how get calculated amount from form to underlaying table
- From: "Wayne Morgan" <comprev_gothroughthenewsgroup@xxxxxxxxxxx>
- Date: Thu, 3 Nov 2005 09:38:36 -0600
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
>
.
- Prev by Date: Re: Email Report With Access
- Next by Date: Re: RecordSource on form
- Previous by thread: Re: Email Report With Access
- Next by thread: Re: how get calculated amount from form to underlaying table
- Index(es):
Relevant Pages
|