Mike Scott
asked on
Altering a forms controls text properties to a non-Latin language in Access 2010
I live in Thailand and am developing a small billing application using MS Access 2010. The administrators of the system may be Thai or English speakers and I would like each form to be displayed to them in their preferred language. Effectively I wish to be able to toggle between the 2 languages.
BTW, I am an access novice.
My problem is that I am unable to get any form to correctly render the text string that I have coded in Thai.
For instance, if I have a button called toggle, I want to be able to switch to Thai via the following statement:-
Me.toggle.Caption = "ฤฆฎฑ"
This is not a valid Thai word BTW, just a random series of characters.
Anyway, despite the control having a unicode font that is supposed to support Thai script, it never renders properly, in fact no Thai characters are ever displayed.
I would be grateful if someone could point me in the right direction as this seem to me to be a fairly modest programming aspiration to have!
Many thanks
Regards
Mike
BTW, I am an access novice.
My problem is that I am unable to get any form to correctly render the text string that I have coded in Thai.
For instance, if I have a button called toggle, I want to be able to switch to Thai via the following statement:-
Me.toggle.Caption = "ฤฆฎฑ"
This is not a valid Thai word BTW, just a random series of characters.
Anyway, despite the control having a unicode font that is supposed to support Thai script, it never renders properly, in fact no Thai characters are ever displayed.
I would be grateful if someone could point me in the right direction as this seem to me to be a fairly modest programming aspiration to have!
Many thanks
Regards
Mike
ASKER
Thanks for the reply, but I don't understand what you are saying.
How would this approach be any different from what I am doing on for load like this ....
Me.Label4.FontName = "Garuda"
Me.Label4.Caption = "ฤฤฤฤฤฤ"
Unless you are saying that I am updating the wrong control properties?
If you have any actual working code that you have used before, I would be able to understand that.
Thanks
How would this approach be any different from what I am doing on for load like this ....
Me.Label4.FontName = "Garuda"
Me.Label4.Caption = "ฤฤฤฤฤฤ"
Unless you are saying that I am updating the wrong control properties?
If you have any actual working code that you have used before, I would be able to understand that.
Thanks
It would be dynamic...you just fill the table with control name and change the caption everytime according to your preferences
ASKER
Thank you once again, but could you please explain to me what I am currently doing wrong?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks John
I understand what you're saying and your suggested approach.
What I don't understand is any intrinsic difference between what your code does and what my extremely simple code does.
I think I must be missing something here, for instance the difference in data stored in a table or coded in a procedure because that's all I can think of that would make your approach work and mine not.
I am using a font that supports Thai, I am using a Thai enabled keyboard, I am using the Thai language pack. This should work but doesn't.
I understand what you're saying and your suggested approach.
What I don't understand is any intrinsic difference between what your code does and what my extremely simple code does.
I think I must be missing something here, for instance the difference in data stored in a table or coded in a procedure because that's all I can think of that would make your approach work and mine not.
I am using a font that supports Thai, I am using a Thai enabled keyboard, I am using the Thai language pack. This should work but doesn't.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
OK, thanks
I understand that
I'll use Johns suggestion
I understand that
I'll use Johns suggestion
you're welcome.
And for the same reason, if you have need to write to a text file, use an ADO stream
you probably want to track what user added and modified records in each table to correlate the English and Thai entries too
be careful not to use reserved words (for instance, use "lang" instead of "language") when you create table and field names:
http://allenbrowne.com/AppIssueBadWord.html
And for the same reason, if you have need to write to a text file, use an ADO stream
you probably want to track what user added and modified records in each table to correlate the English and Thai entries too
be careful not to use reserved words (for instance, use "lang" instead of "language") when you create table and field names:
http://allenbrowne.com/AppIssueBadWord.html
ASKER
John
Many, many thanks. Your solution worked perfectly.
Apologies for not understanding the difference in holding unicode in fields as opposed to VBA variables.
Mike
Many, many thanks. Your solution worked perfectly.
Apologies for not understanding the difference in holding unicode in fields as opposed to VBA variables.
Mike
ASKER
Huge thanks to John and Crystal.
Glad you worked it out...
you're welcome ~ happy to help
Form--ControlName----Langu
frm1--lblInformation---Eng
frm1--lblInformation---Tha
Then on the Load event of each form you load a filtered subset of this table and you do the mappings to the controls you want