In a new module place this code:
'Windows API/Global Declarations for :CapLock
'*********************************************
Public Const VK_CAPLOCK = &H14
Public Type KeyboardBytes
kbByte(0 To 255) As Byte
End Type
Public kbArray As KeyboardBytes
Public Declare Function GetKeyState Lib "user32" _
(ByVal nVirtKey As Long) As Long
Public Declare Function GetKeyboardState Lib "user32" _
(kbArray As KeyboardBytes) As Long
Public Declare Function SetKeyboardState Lib "user32" _
(kbArray As KeyboardBytes) As Long
'************* End Code ************
When prompted name the module something like ControlCapsLock
Then, replacing YourComboName with the ***actual*** name of your own combobox,
use this code:
Private Sub YourComboName_GotFocus()
'Turn Capslock On
GetKeyboardState kbArray
kbArray.kbByte(VK_CAPLOCK) = 1
SetKeyboardState kbArray
End Sub
Private Sub YourComboName_LostFocus()
'Turn Capslock On
GetKeyboardState kbArray
kbArray.kbByte(VK_CAPLOCK) = 0
SetKeyboardState kbArray
End Sub
This will turn the CapsLock on amd off as you enter and leave the combobox.
Having given you this, I have to say that my concern would still be why your
combobox is behaving this way! I'd be worried about corruption of the
combobox control, and would probably, as a first effort, delete the combobox
then re-create it.
The fact is that getting Access to compare text in a case-sensitive manner
takes some deliberate action which can be quite complicated, depending on
where/how you're trying to do it. It certainly shouldn't be doing it here!