UtterAccess.com
X   Site Message
(Message will auto close in 2 seconds)

Welcome to UtterAccess! Please ( Login   or   Register )

Custom Search
3 Pages V  1 2 3 >  (Go to first unread post)
   Reply to this topicStart new topic
> Foreign Currencies In Runtime Apps, Any Version    
 
   
ztatzau
post Feb 18 2020, 01:02 PM
Post#1



Posts: 374
Joined: 4-April 07



I've recently received inquiries about my Access RT App from potential clients in Europe and South Africa asking if the currency settings can be changed to Euros or Rands rather than American Dollars. I don't see any currency settings or selection in Access Options > Current Database options...

Does a Runtime App simply adopt the Windows OS' currency settings from the computer upon which the RT App is installed?

PLMK! ZT
Go to the top of the page
 
fogline
post Feb 18 2020, 01:22 PM
Post#2



Posts: 232
Joined: 5-August 15
From: Ringgold, GA. USA


Hi ztatzau
I have an Access app that supports 54 Countries with there Currencies.
The way it works is when the end user first starts using your app they will
select there Country and it will set there Currency thru out the program from then on.
I will try to setup a sample app for it ASAP and post it..

--------------------
Ray White - Fog Line Software LLC.
Email
Go to the top of the page
 
ztatzau
post Feb 18 2020, 01:33 PM
Post#3



Posts: 374
Joined: 4-April 07



Thanks for your reply fogline!

Can you confirm that a RT App WILL NOT automatically adopt the Windows Currency Settings of the computer the App is installed on?

If that is indeed the case, I look forward to seeing your sample!

I do appreciate your help!

ZT
Go to the top of the page
 
fogline
post Feb 18 2020, 01:43 PM
Post#4



Posts: 232
Joined: 5-August 15
From: Ringgold, GA. USA


I have never had no luck getting it to.

--------------------
Ray White - Fog Line Software LLC.
Email
Go to the top of the page
 
ztatzau
post Feb 18 2020, 02:18 PM
Post#5



Posts: 374
Joined: 4-April 07



Thanks again fogline!

I'll be looking forward to seeing your sample app!

ZT
Go to the top of the page
 
fogline
post Feb 18 2020, 02:20 PM
Post#6



Posts: 232
Joined: 5-August 15
From: Ringgold, GA. USA


Ok Try this sample App
First open the Country Settings form and pick your Country
then open the Sample form. It will show you how to do the code.

I'm sure they may be a better way to do this but this works.
If anyone else would like to modify it please do and re-post it for others to use.

Attached File  InternationalCurrency.zip ( 117.61K )Number of downloads: 4

--------------------
Ray White - Fog Line Software LLC.
Email
Go to the top of the page
 
FrankRuperto
post Feb 18 2020, 05:08 PM
Post#7



Posts: 1,116
Joined: 21-September 14
From: Tampa, Florida USA


Hi ZT,

If you are compiling the FE on your machine that has Win Regional set to USA, and distributing the accde with runtime, maybe the accde is stuck on USA Regional and would need to be recompiled with the target locale set to e.g. Germany? Or perhaps with vba code tell it to use local regional setting?
This post has been edited by FrankRuperto: Feb 18 2020, 05:09 PM

--------------------
Currently supporting pawnbrokers that use my store management system developed with Access 2010 on Windows7. Experienced with Informix, Oracle & PostgreSQL db's.
Go to the top of the page
 
ztatzau
post Feb 18 2020, 08:36 PM
Post#8



Posts: 374
Joined: 4-April 07



Thanks again fogline! I have downloaded your sample and will have a look at what you are doing and how you are doing it. I'll post back with any questions.

Thank you too Frank!

RE: "If you are compiling the FE on your machine that has Win Regional set to USA, and distributing the accde with runtime, maybe the accde is stuck on USA Regional and would need to be recompiled with the target locale set to e.g. Germany?"
Yep! That's exactly what I am doing and perhaps this would indeed preclude a RT (ACCDB > ACCDE > ACCDR) APP from adopting the regional settings of the user's machine.

RE: "Or perhaps with vba code tell it to use local regional setting?"
Easy for you to say Frank! What you suggest is likely beyond my current skill level; but could be exactly what fogline's code is doing.

This should keep me busy for a while!

ZT
Go to the top of the page
 
fogline
post Feb 18 2020, 10:10 PM
Post#9



Posts: 232
Joined: 5-August 15
From: Ringgold, GA. USA


Great Good luck with it ZT
I think you will find it simple to use.
If you have any questions let me know.

--------------------
Ray White - Fog Line Software LLC.
Email
Go to the top of the page
 
FrankRuperto
post Feb 19 2020, 12:14 AM
Post#10



Posts: 1,116
Joined: 21-September 14
From: Tampa, Florida USA


You're welcome ZT. We have several users in different countries. It's been our experience that when we make mods to their frontend's its best to remote into their machines and compile their FE's locally to avoid dependency problems, such as regional settings, reports that are setup to print to specific printers. We are in the process of creating lookup tables for printers, regional settings, display resolutions and storage devices in an attempt to make our apps more portable so we can eliminate hardcoded things like paths in our vba code.

Also keep in mind that when you use VBA to concatenate dates into an AccessSQL query string, you must use a standard U.S. date format, regardless of the locale selected in Windows Regional Settings. Dates can still be displayed in any locale format, however in VBA code, date strings must always be in U.S. format. The following is a custom VBA function that can be used to convert any non-U.S. date format into U.S. date format.

CODE
Function ToDateUS(InDate As Variant) As String

' Exit function if not a valid input date.
If Not IsDate(InDate) then exit function

' Convert input date to a U.S. date format.
ToDateUS = "#" &; Month(InDate) &; "/" &; Day(InDate) &; "/" &; Year(InDate) &; "#"

End Function

This post has been edited by FrankRuperto: Feb 19 2020, 12:38 AM

--------------------
Currently supporting pawnbrokers that use my store management system developed with Access 2010 on Windows7. Experienced with Informix, Oracle & PostgreSQL db's.
Go to the top of the page
 
ztatzau
post Feb 19 2020, 11:09 AM
Post#11



Posts: 374
Joined: 4-April 07



Thanks again fogline! Before I start modifying anything and testing, please let me know if I'm correctly understanding your sample and starting off on the right foot. (NOTE: I am, at this point, only concerned with Currency Formats)

Your code...
==========================
Private Sub Form_Load()

Me.AmountTotal.Format = GetSymbol()
Me.Amount.Format = GetSymbol()
' Me.lbUnits.Caption = GetUnitsLable()
' Me.lbDistance.Caption = GetDistanceLable()

End Sub
==========================
... needs to be added to the On_Load event of EACH FORM and REPORT containing any currency fields and the format property setting of EACH SUCH CURRENCY FIELD must be individually referenced in a separate line in the above code? Is that correct?

Thanks again to you too Frank!

RE: "It's been our experience that when we make mods to their frontend's its best to remote into their machines and compile their FE's locally to avoid dependency problems, such as regional settings, reports that are setup to print to specific printers."

I've never remotely accessed my clients machines before and I'm not really comfortable with doing so. And if I understand you correctly, this methodology would also require installing the FE ACCDB on the client's machine, at least initially, in order to compile it locally. DO I have that correct?

As for adding the capability for the user to select specific printers for certain reports, you might like to check out Pere_de_Chipstic's "PrinterSelect Demo" code in the UA Access Code Archive at the following link.

https://www.UtterAccess.com/forum/index.php...=printer+select

I've added Pere_de_Chipstick's Printer Select capability to my apps and it has worked very well for me. (Thanks again Bernie!)

RE: "Also keep in mind that when you use VBA to concatenate dates into an AccessSQL query string, you must use a standard U.S. date format, regardless of the locale selected in Windows Regional Settings."


And you raise yet another "Fly in the Ointment" that I hadn't considered. My apps do produce a number of reports that are date, or date range, specific. So if it comes to modifying my app for specific international clients, your date conversion code will be a great help! Thank you again for your help!

ZT
Go to the top of the page
 
fogline
post Feb 19 2020, 11:17 AM
Post#12



Posts: 232
Joined: 5-August 15
From: Ringgold, GA. USA


QUOTE
add this to the On_Load event of EACH FORM and REPORT containing any currency fields and the format property setting of EACH SUCH CURRENCY FIELD must be individually referenced in a separate line in the above code?
Is that correct?


Yes that is all you will need.

Private Sub Form_Load()

Me.FieldName.Format = GetSymbol()

End Sub

In that sample app you can just take out anything to do with the Units and Distance
and just keep the Currency GetSymbol
This post has been edited by fogline: Feb 19 2020, 11:23 AM

--------------------
Ray White - Fog Line Software LLC.
Email
Go to the top of the page
 
ztatzau
post Feb 19 2020, 11:57 AM
Post#13



Posts: 374
Joined: 4-April 07



Thanks fogline! I appreciate your help!
ZT
Go to the top of the page
 
fogline
post Feb 19 2020, 12:14 PM
Post#14



Posts: 232
Joined: 5-August 15
From: Ringgold, GA. USA


Anytime yw.gif
Let me know if you have any trouble with it.

--------------------
Ray White - Fog Line Software LLC.
Email
Go to the top of the page
 
ztatzau
post Feb 19 2020, 01:58 PM
Post#15



Posts: 374
Joined: 4-April 07



I had another idea as I reconsidered what Frank said above...

"If you are compiling the FE on your machine that has Win Regional set to USA, and distributing the accde with runtime, maybe the accde is stuck on USA Regional and would need to be recompiled with the target locale set to e.g. Germany?"

Because each of my RT Apps are individually created with a significant amount of customization for each user, I'm wondering if it might be a lot easier and solve the currency by building the ACCDB FE as usual (on Win 7 - with Access 2007), and then change the regional settings on my development computer to a specific country before compiling the ACCDB to create a region specific ACCDE.

Any thoughts on the feasibility of this approach would be appreciated!
ZT
Go to the top of the page
 
FrankRuperto
post Feb 20 2020, 11:20 AM
Post#16



Posts: 1,116
Joined: 21-September 14
From: Tampa, Florida USA


Test that to see the results. Change Win regional and compile to accde, then install it with the RT on another box that doesnt have full Office Pro, but has the same Win regional setting you have when you compiled the accdb, and see what happens. Also change Win Regional on target box to USA to see what happens
This post has been edited by FrankRuperto: Feb 20 2020, 11:22 AM

--------------------
Currently supporting pawnbrokers that use my store management system developed with Access 2010 on Windows7. Experienced with Informix, Oracle & PostgreSQL db's.
Go to the top of the page
 
fogline
post Feb 20 2020, 11:52 AM
Post#17



Posts: 232
Joined: 5-August 15
From: Ringgold, GA. USA


Frank is there anyway to write any code that would let a end user could just pick the region you want and
have it change the regional settings in the App?

The way you are talking about compiling it to the region that you need is nice I have never thought about doing it that way.

--------------------
Ray White - Fog Line Software LLC.
Email
Go to the top of the page
 
FrankRuperto
post Feb 20 2020, 12:06 PM
Post#18



Posts: 1,116
Joined: 21-September 14
From: Tampa, Florida USA


There's some examples in this link that shows how to temporarily change Regionals while the Access app is open. The right way to implement it is to put all the constant bit values in a Locales Access table for the countries you want to support and user picks the locale.
https://www.tek-tips.com/viewthread.cfm?qid=1273294

EDIT: This only takes care of regionals, but what about everything else? I have some users who actually have a Microsoft Office Spanish Language Pack installed and the entire Office (Access included) user interface, error messages, etc. are in Spanish.
This post has been edited by FrankRuperto: Feb 20 2020, 12:31 PM

--------------------
Currently supporting pawnbrokers that use my store management system developed with Access 2010 on Windows7. Experienced with Informix, Oracle & PostgreSQL db's.
Go to the top of the page
 
fogline
post Feb 20 2020, 12:29 PM
Post#19



Posts: 232
Joined: 5-August 15
From: Ringgold, GA. USA


Great thanks Frank
I'll check that out.

--------------------
Ray White - Fog Line Software LLC.
Email
Go to the top of the page
 
fogline
post Feb 20 2020, 01:21 PM
Post#20



Posts: 232
Joined: 5-August 15
From: Ringgold, GA. USA


Microsoft Office Language Pack ....
That may work also, I'll do some research on that.
Thanks Frank

--------------------
Ray White - Fog Line Software LLC.
Email
Go to the top of the page
 
3 Pages V  1 2 3 >


Custom Search


RSSSearch   Top   Lo-Fi    16th July 2020 - 09:39 AM