Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Adding an exchange rate calculation to a database/reort

Status
Not open for further replies.

kiiwii2

MIS
Sep 24, 2004
14
CA
Hi,

Originally the programmer who created our database did an invoice report in which each line the US exchange rate was calculated. So that now everytime the rate changes and we invoice,(which is only once every 2 months), we have to go in and change the calculation. IE: ([price] *.075). But we have to change it on each line everytime we invoice. I am trying to see if there is a better way I can make the change so that everytime I invoice I make the change once (preferably a pop up) and then edit all the lines in my invoice report to something like:([price]*[USX]).

Any ideas on how I can do this.
 
You can create a table with only one record. Use a field in the table named USX and set the value of this field in the one record to the current rate. Add the table to your report's record source and use the field as noted at the end of your paragraph above.

Duane
MS Access MVP
Find out how to get great answers faq219-2884.
 
Hi Duane,

Thanks for the quick response. That is what I thought I had to do and I tried that but I got a #error instead of the new calculation?

Thanks,


Cheryl
 
Could you show us your calculation? What is the name of the text box showing the Error?

Duane
MS Access MVP
Find out how to get great answers faq219-2884.
 
Hi,


this the the calculation:
=IIf([txtBilltoCountry]="USA",([Price]*[USX]![USX]),[Price])

The textbox is just "text93"

I hope I am making sense.

Thanks,

Cheryl
 
Try leave off the table name since the report doesn't know or care what the source table is.
=IIf([txtBilltoCountry]="USA",[Price]*[USX],[Price])

Duane
MS Access MVP
Find out how to get great answers faq219-2884.
 
Thanks Duane,

I got it. It was 2 problems. # 1 I went back to look at the USX db I created and noticed I had it as a text not a number and the 2nd thing is that there are a bunch of databases & quieres put together for this report, so I had to add the db to one of the queries.
 
That's what I meant by "Add the table to your report's record source".

Glad to hear it is now working.

Duane
MS Access MVP
Find out how to get great answers faq219-2884.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top