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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

great multiple currency convert problem

Status
Not open for further replies.

pinstripe

Programmer
Dec 27, 2004
52
0
0
Dear all,

my friend owns a few lorrys and i would like to help him with an expenses paid histroy!
Expanses he has for one lorry on one drive for example are road taxes, gas bills etc.(for different states)
This means that i have to cover at least 4 different currency.
I have 12 entering fields for different expanses and beside each, a comboBox with different currency(Euro,Sit,Hr,Gbp) to be selected - i don't know if this is the right thing to do.
All of these 12 fields needed to be added up and converted at some point... then outputed in one currency only, but also left a possibility to show how much and in which currency expenses were originaly puted in.

I even don't know how to begin with this, so it would be the most efficient and fast.
I have tryed with "=IIf([Valuta Spedicija1]="SIT";([Spedicija1]/[Euro])+[Spedicija2]....)"
but there is to many fields to be checked and added up.

If anyone has any idea how to start with this and make it work, please help me!
Thank you



 
Beside every input field and currency combobox put an additional unbound textbox. The record source should be the calculation for the currency entered to the currency you are working with (this will instantly calculate the currency exchange without having to wait until the end of data inputting). You could even make this a macro or vba sub routine.

add a control button to the form. when this is clicked make it add up all the unbound textbox values with the currency exchanged totals in them and show them in a total textbox. This way you will see the original input expences value , the input currency and the working currency value you use for accounting.

To help a little more, make the default currency in the combobox blank. and in its 'on dirty' event use the following


Private Sub currency1_Dirty(Cancel As Integer)

select case me.combobox
case Euro
me.unboundtextbox1 = input x euro calculation
case Sit
me.unboundtextbox1 = input x sit calculation
case Hr
me.unboundtextbox1 = input x Hr calculation
case Gbp
me.unboundtextbox1 = input x Gbp calculation
end select

End Sub



Ian Mayor (UK)
Program Error
Programmers do it one finger at a time!
 
Hi Ian,

thank you for such fast response.
your suggestion is very helpfull and it is the right pointer, but still i have a question to ask.
I have one form "Settings" were user can input the last currency rate (for Euro,Sit...)

These calculation are being made on another form.
What i would like to do is to calculate the input with the last currency rate inputed into different table via form
"Settings"
These calculation are being made on another form "Calculate".

for example:
.
.

case Euro
me.unboundtextbox1 = input x [Euro] '- last record
.
.
.
just i don't know how to link that last record with all of this?
BTW: these two tables are in relationship one-to-many

thank you for your help
 
the problem is solved!

i have used "Dlast" function

case Euro
me.unboundtextbox1 = input x (DLast("[Euro]","[Settings]"))

at the end - so simple, but i've could not done it so fast without your pointers or hints!
thank you again
Best,

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top