Is there a property that could be used as a second tag, or a property that could hold a second caption?

Hi Experts,
I have some forms in a database that occassionally (depending on who walks up to the workstation) needs to display text in SPANISH or ENGLISH.    I have done this in the past by just hard coding the two versions of the text using VBA and changing the CAPTION of the BUTTON or LABEL via that code.  

I'd like to figure out two properties on a CONTROL (button or label), to hold the ENGLISH and SPANISH versions of text, then use the TAG property to decide which CONTROLS get toggled back and forth.

My thinking is that if I can streamline the way I do this, it will be lots easier to add the "BI-lingual" feature to new forms, and easier to enter/edit the SPANISH version without having to dig around in the VBA.  

Any ideas?
Who is Participating?
Jeffrey CoachmanConnect With a Mentor MIS LiasonCommented:
This is why things like this are so tricky.

The issue with your approach is that the English/Spanish must be hard coded into each control...
This means that you will have to edit each control individually.

If it were me, I would store each control's English and Spanish value in a table.
Then based on the English/Spanish variable, ...set the appropriate text.
The advantage here would be that you could edit the text in one central location (the table), instead of each control individually.
The only drawback would be creating and maintaining the table...

But perhaps this is a: "Six of one, half dozen of another" scenario...

In any event...
To do it your way you would insert a comma between the two words without a space

Then this would get you the English:

...and this would give you the Spanish:
Dale FyeCommented:
Makes more sense to put this in a table with FormName, ControlName, Language, Caption

Then you can use the Form load event to loop through this table and populate the caption properties based on a database wide variable that identifies the specific language.  This way, you can eventually expand beyond those two languages if you need to.

Jeffrey CoachmanMIS LiasonCommented:
AFAICT you could use a Public variable for this as well

In a module, do something like this:

Public strpubLanguage as string

Then on your startup form, put an option group that sets this variable.

If me.fraLanguage=1 then
   strpubLanguage ="English"
ElseIF me.fraLanguage=2 then
   strpubLanguage ="Spanish"
End if

Then use this variable to set the language

If strpubLanguage ="English"  then
    'Your code to set the text to English
ElseIF me.fraLanguage=2 then
    'Your code to set the text to Spanish
End if

Also, consider just installing the "Language pack"

As most of the functionality you may need is simply built in.

An added benefit would be the the Menus/Ribbon/commands, in Access will change as well..

Get 10% Off Your First Squarespace Website

Ready to showcase your work, publish content or promote your business online? With Squarespace’s award-winning templates and 24/7 customer service, getting started is simple. Head to and use offer code ‘EXPERTS’ to get 10% off your first purchase.

TechGuise9Author Commented:
I am assuming that the answer to my original question is "No", there are no other properties or "ways"  to hold an "English" and a "Spanish" version of the caption text.    

The two suggested solutions above I'm sure are much more programatically correct than what I am wanting to do, but neither gives the desired outcome I'm looking for.  

I want future users to be able to open up the properties of a control and see both language versions without diving into the code.   There can be all kinds of complicated code behind the scenes changing the current values, but need it very very clear as to what and where the different versions are kept (while on the same screen as the control)

Thinking the best option will be to add a second Control for each control to hold text.  (clunky I know)

Since both seem to be good solutions, but neither fitting my "odd" desires, I will split points unless someone has an objection.

Jeffrey CoachmanMIS LiasonCommented:
To try to answer your question directly:
No, there is no distinct "Language Property" of any control that you can set to English/Spanish and it will "automaitcally" swithch the language of the text in that control.

But to be clear, you can use the "Tag" Property and set it to a certain value (ex: "ML" for multi-lingual) for all the controls that you want to swap the languages.
Then use code like I posted to do the swap.
(Presumming that somewhere you have the different languages stored)

Something *roughly* like this.
If strpubLanguage ="English"  then
Dim ctl as control
    For each ctl in me.controls
        If ctl.tag="ML" then
            me.ctl='Your function to change the text to English

But again, investigate the language Packs...
TechGuise9Author Commented:
Thanks, the TAG method was what I was hoping to use all along.  My challenge was/is a local place (relative to control) to store the two different versions.

The language packs won't work.   It is for a manufacturing facility that uses special terms that don't always translate correctly.

Wonder if it is possible to seperate the TAG property into sections
          (ie.. ML Hello Hola) and use VB code to look at the correct section?
Maybe a "Right(ctl.tag,string......???
I wouldn't even know where to start with a syntax to try.
TechGuise9Author Commented:
Awesome!  It's going to be a few days before I am able to try it, but that looks like exactly what I need.


I totally understand that the TABLE would be the "best practice" method.  Problem is it would require a lot more pre-thought (on my part) figuring out which controls needed the feature, AND I would have to show the person translating what the context was of the word(s) being translated, but if they can see the CONTROL itself then all I have to show them is how to modify a property.
There will only bea few forms here and there that need the feature and I won't know which ones until later.

Goofy, I know..... but thanks again.
Jeffrey CoachmanMIS LiasonCommented:
As always, there is no right or wrong in most cases...

This is why it is always best to know multiple ways of doing the same thing
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.