Full Version: Changing Keyboard Language via VBA
UtterAccess Forums > Microsoft® Access > Access Forms
RezaAsadi836
NOTE: This question was originally posted as a reply to this discussion from 2004.

Hey there,
I used that attribute but dose not work. anyway, would you please tell me how I can use VBA code? [...].keyboardlanguage=XX
this term is available in VBA event code builder, but what should I set instead of XX to change key-layout as for example EN?
cheekybuddha
Hi, and welcome to UtterAccess!
welcome2UA.gif

First, a piece of advice: it's a good idea to start a new thread and link to this one if you have a new question. I saw this thread earlier today but saw that it already had several replies and didn't bother to look at the posts til now!

With regards to your question:

From the Access help files:
QUOTE
KeyboardLanguage Property

You can use the KeyboardLanguage property to specify or determine the keyboard language on entry into a control. Read/write Byte.

expression.KeyboardLanguage
expression Required. An expression that returns one of the objects in the Applies To list.

Remarks
You can set this property by using the property sheet or Visual Basic.

Valid values for this property are 0 (zero), which corresponds to the default system language, or plid + 2 where plid is the primary language ID of a language installed on the current system. For example, the primary language ID of English is 9, so the corresponding KeyboardLanguage setting is 11. For a list of languages and their primary language IDs, search for "Primary Language IDs" in the MSDN Web site. (An exception to this list is Traditional Chinese which is represented by the value 200.)

Setting this property to a language that is not installed may either have no effect or cause an error.


The Pirmary Language Identifiers can be found here

They are in hexadecimal, so you would need to convert them to base 10. You can use an online translator like this one (You only enter the portion after the 0x).

hth,

d
This is a "lo-fi" version of UA. To view the full version with more information, formatting and images, please click here.