How To Turn Ime On Or Off for Inputbox?

deletedT

Guest
Local time
Today, 16:56
Joined
Feb 2, 2019
Messages
1,198
Is it possible to turn On/OFF IME before showing an inputbox?

Every textbox on a form or a table can be set to make IME on or off when activated (through its property sheet).

At some situations, I need to turn IME On and then show inputbox.
Is it possible?
I know how to do it in Excel VBA. but I haven't been able to do the same task in Access.


Winows 10
Microsoft Access 2016


Thank you.
 
Welcome to AWF
You previously posted this at .... where you had several answers.

It would have been courteous to provide the link yourself.
Pleas read this link about the etiquette of cross posting ......

Thanks for your welcome.
And Yes, I've asked this question there too and received some replies which I followed and ended up adding my Inputbox class to my project and am using it at present.

But none of them was the actual reply to my question. If I can turn IME on/off in Excel VBA, I don't think it's impossible to do the same in Access too. That's why I came here.
I also have posted this question in MSDN and have written directly to Office support desk.
Maybe I should have included a list of all help requests I've done to show how desperate I am to learn something new.

I didn't find the answer and I tried different Forum and different experts.
I don't want to be rude in my first post here, but I don't consider asking from different experts in different sites double posting. Maybe it's a different between our common sense.

But after all, you are right. Maybe I should have read the your rules first.

Thanks again.
 
Its not AWF rules. Its fairly standard across most forums though UA seems not to care as much.
As the linked article indicates, there's nothing wrong with cross posting provided you inform readers of other similar posts made elsewhere

The reason is so that anyone responding doesn't waste time repeating comments already made elsewhere.

It would help if you explained WHY you occasionally need to change the IME settings as many people may know nothing about them.
I had to look this up before replying to your question at UA

For example, see https://answers.microsoft.com/en-us/msoffice/forum/all/access-what-is-ime-mode/9006cf84-86ca-40e2-926a-ebea52efa76b?auth=1 and https://docs.microsoft.com/en-us/office/vba/api/access.combobox.imemode
 
It would help if you explained WHY you occasionally need to change the IME settings as many people may know nothing about them.
I had to look this up before replying to your question at UA

For example, see .....

Again you are right.
I should have explained the situation too.

When we add a double-Byte character language such as Japanese or Chinese to windows keyboard layout, Windows adds a tiny program called IME. This program sits in the taskbar and gives us the power to change keyboard layout. Once it turns ON we can type Japanese/Chinese. Once we turn it OFF, we can type with normal layout of keyboard and type English or Numbers.

It's true for all double-byte character languages such as Japanese-Chinese-Arabic-Persian-Korean etc. Maybe the whole Asian languages.

So we are using keyboard short cuts million times a day to type a document or anything else to move between keyboard layouts.

Now imagine a form that is used for adding or updating customer data.
Name, Address, title etc should be written with IME ON because they use let's say Japanese characters.
But TL - Mail Address - zip - URL etc should be written with IME OFF because we need type them in English alphabet.

Now you can realize a user ends up using keyboard shortcuts million times a day.

Forms are great. Every textbox on a form has three property dedicated to IME. Make it ON or OFF when activated, Keep the situation when exiting the text box and which Dictionary to use. (Refer to my image in ulteraccess. I can't upload an image here.)

So when a user is presented with a form to input data, I have full control over IME. Turn it On/OFF when necessary to speedup the input or prevent possible miss types.

The problem is when the program shows an InputBox for data, Users have to use keyboard or mouse click on task bar to change layouts and be able to type Kanji (Japanese Character) or English alphabets.

For sure, my application users would be much happier if the program turns on IME On/OFF when giving them an inputbox to type data.

You may think a SendKey may do the magic. But it won't.
Because the same short cut is used to turn it ON or Off. Once pressed, if it's ON, it turns OFF. If it is OFF, it turns ON.

So before using SendKey, I have to be sure IME is ON or OFF. to be able to decide sending the shortcut or not.

I hope it makes it clear.

EDIT: Isladogs - added screenshot of image from UA
 

Attachments

  • Capture.jpg
    Capture.jpg
    37.1 KB · Views: 378
Last edited by a moderator:
An excellent explanation. Thank you
I've added your screenshot.
For info, you can attach files before you have 10 posts if you zip them first.

OK I need to stress that I've never needed to worry about IME which is why I looked it up. Someone else may have a solution based on personal experience

Its easy enough to find the VBA code relating to IME - see attached screenshot
You should be able to use that in your code to select what you need

You may still need to use my original suggestion to create your own input form using the IME code
Or two almost identical versions - one with IME and the other without. Then select the appropriate version depending on the input language needed.

Good luck. If you succeed, please post your solution
 

Attachments

  • IME VBA.PNG
    IME VBA.PNG
    27.2 KB · Views: 184
Its easy enough to find the VBA code relating to IME - see attached screenshot
You should be able to use that in your code to select what you need

You may still need to use my original suggestion to create your own input form using the IME code
Or two almost identical versions - one with IME and the other without. Then select the appropriate version depending on the input language needed.

Good luck. If you succeed, please post your solution

Thanks again.

The vba classes that your image shows all returns to controls on a form. And I already know Access can't do anything with Input box.

I actually was looking for an API code that controls Windows situation.

I've already accepted your suggestion and added a new class to my application. This class shows a form designed just like Inputbox and I use vba to control IME in the form when shown to users.

My intention for asking this question here was just because I'm sure there should be a way to control Inputbox in Access too.(just like Excel).
I was just eager to learn something new.

Million thanks.
 
You're welcome.
It MAY be possible but I know input boxes are remarkably difficult to alter in any significant way.
Hopefully someone will have some ideas for you but so far nothing from either forum.

The only thing I've ever done with them is mask the text users input with *****
Even doing that was a pain.
I now create just my own popup forms which look better and can be modified to suit my needs

EDIT:
Please can you post your solution for the benefit of anyone else with this issue in the future
 
Last edited:

Users who are viewing this thread

Back
Top Bottom