473,396 Members | 1,990 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Can you change System Format in VBA

I have built a wonderful database that I had to share with someone in Brazil. Unfortunately because his system format is set to Portugese(Brazil) the database works incorrectly.

Is there a way to have his system read the vba code in Access or do I need to build two sets of code for the same database, or do I really need two seperate databases?

I have never worked with international builds before so this is completely new territory to me.
Oct 14 '10 #1
6 2249
nico5038
3,080 Expert 2GB
Different language versions aren't solved well by MS.
Personally I always work in a US version and executing that in another language will work always.

The main problem is in using the objects (like "Form!") in your queries as Access will translate them automatically into the language of the Access version. The A2007/A2010 version is even blunt enough not to recognize the "Empty" string in the startup form from the actions panel when not in the right language.

So my advise to you is to construct/move the database in a US version, cleanup the errors (Like the mentioned "Form!" references in your queries) and then deliver it in Spanish and Portuguese.

Nic;o)
Oct 14 '10 #2
Thank you. the database as constructed in the US version. It only had an issue when it was given to that one person. All the other countries (4 total) it worked fine.

The error that it was getting was a syntax error and it seemed to put semi-colons where commas usually are in the modules. Everything else worked beautifully. Or I should say appears to work beautifully. He is still testing the application.

I appreciate your response. Thank you so much. I have found that even though I know a lot.. I still have much to learn.
Oct 14 '10 #3
nico5038
3,080 Expert 2GB
Advise that person to change the Regional settings in the Control Panel, as Access will use them for a number of tasks.

Nic;o)
Oct 14 '10 #4
We did that to get it to work, but wouldn't that mean he would always have to change it back and forth in order to complete other tasks?
Oct 15 '10 #5
nico5038
3,080 Expert 2GB
You could change the code to replace the semicolons with comma's when it's all in stringing expressions.
The trick is to assign the string first and inspect the result with an Instr() function. I used it e.g. to find out what currency sign is used on a user PC.

Another option would be to code the change of the regional setting in the database when started and change it back when ready. This will however temporary "disable" the feature for other applications.

In general a list separator isn't that important for a user, thus I expect that changing it once just for the sake of running the database won't be a problem.

Nic;o)
Oct 15 '10 #6
NeoPa
32,556 Expert Mod 16PB
If I were in your situation, I'd determine the likely problems with the location settings of the PC at the start, and write your code to handle this in those places where you know it will struggle.

You already have experience of where many of these are from your Brazilian colleague.

Determine the problems your code falls over. Do them basically in US mode, then in those areas add an If statement afterwards to convert where necessary. Just as an EG, if you had a numeric value of 12,326.02 which needed to be converted to the standard European mainland version of 12.326,02 then something like :
Expand|Select|Wrap|Line Numbers
  1. strFormatted = Format(dblValue, "#,##0.00")
  2. If Not blnCompatible Then
  3.     strFormatted = Replace(strFormatted, ",", "@")
  4.     strFormatted = Replace(strFormatted, ".", ",")
  5.     strFormatted = Replace(strFormatted, "@", ".")
  6. End If
This is simply an example to convey the general idea. You would need to handle each situation as you were aware of them. Good luck.
Oct 15 '10 #7

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: Miso Hlavac | last post by:
hello, I need to change date format from mm.dd.yyyy to dd.mm.yyyy But only for one database. In other databases I need mm.dd.yyyy is it possible set this format permanently??? thanx... miso
2
by: sang | last post by:
Hi Pls help to change the Date format in mysql Mysql default storage is yymmdd but i want to store mmddyy. How to change the format. Thanks, Sang
1
by: George Eapen | last post by:
Folks.. just wanted to know which class can be used to change the format of a date . eg..Date is given in dd/mm/yy min:sec format.. i want to trim it to "April 20,1995" format. can any...
3
by: Bface | last post by:
Hi all, Hope everyone had a good holiday. I am having a difficult time changing the date format of a field from Excel. I have never had this problem before. I link the excel spreadsheet to my DB,...
1
by: mahendravishwa | last post by:
Hi, I want to change DateTime format in MySQL Database Table in dd/MM/yyyy format. Its possible so please provide guidance. Thanks
1
by: dhanashivam | last post by:
Hi All, I have a crystal report document which is opened from my asp.net 2.0 application (C# code). In the design time i fixed my date fields as MM/dd/yyyy format. but now we are going to...
3
by: Limno | last post by:
Hi, Can anyone suggest me, how to change the Date format in SQL. By Default it Creates datatype datetime as '0000-00-00 00:00:00'. But i want to change d format as Month/Date/Year. while Creating...
1
by: MBMSOFT | last post by:
Any idea how to change system keyboard language with vba I tried changing keyboard property in the control property and it works but i need change in one control only, and if i change property...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.