How to disable input in bound combobox using IME

I am trying to find a way to disable IME input (Japanese) in a bound combobox control in MS access 2016 form.

The problem I am facing is that on a bound ComboBox control it will change to Hiragana even with IME mode set to disable, whilst on a non bound Combobox, setting IME mode to disable will prevent IME from changing to Hiragana which is the expected behavior.

My ultimate goal is to disable all kind of keyboard input to the target ComboBox either bound or unbound either with direct input or with IME.

I use the following code the block keyboard input (non IME) in the ComboBox, but this does not work with IME input, so I thought disabling IME is my only way achieve complete keyboard input prevention on the control.

Private Sub comboBox_KeyDown(KeyCode As Integer, Shift As Integer)
  If KeyCode <> vbKeyTab And KeyCode <> vbKeyReturn And KeyCode <> vbKeyDelete And KeyCode <> vbKeyBack Then KeyCode = 0
End Sub

EDIT:

By bound control, I mean it has the property Control Source set

Upvotes: 1

Views: 663

Answers (0)

Related Questions