Solved Case Is "^"

Lampje

Member
Local time
Today, 17:35
Joined
Jul 20, 2021
Messages
37
Forum,

if one is on a Dutch keyboard " or ^
type the program waits for the next entry. This is normal in a Dutch way. With an arithmetic function, this causes problems. Is there a possibility to fix this with some function? Case Is = "^" does not see the program, only when one types a two ^ does the program respond.

Gr. Lampje
 
then use double ^.
 
then use double ^.
Thank you for the response,
in a text field numbers and +-*/ are entered, the last character determines how the course of the program continues, the last character is deleted, the rest is in memory. When there are two ^^, the program handling error.

Gr. Lampje
 
what are you making anyway?
calc, there is already available in all windows/mac
why reinvent.
 
what are you making anyway?
calc, there is already available in all windows/mac
why reinvent.
Create a calculator that works by not clicking buttons but by entering in a text field. This will go well until you type a ^.

Gr. Lampje
 
can you use Eval(Me!InputText) to get the result?
Arnelgp,

Thanks for the response, but that didn't help me any further. After a long search on the internet, I came across the following solution:

Code:
Option Compare Database
Option Explicit


Private Declare PtrSafe Function ActivateKeyboardLayout Lib "user32.dll" (ByVal mylanguage As Long, flag As Boolean) As Long


Private Const Dut = 1043
Private Const Eng = 1033

And

Code:
Private Sub Tekst4_Click()
Call ActivateKeyboardLayout(Eng, True)
Me.Tekst4.SetFocus
End Sub


Private Sub Tekst4_enter()
Call ActivateKeyboardLayout(Dut, True)
Me.Tekst4.SetFocus
End Sub


Thank you for your time and commitment,

Gr. Lampje
 
Why the setfocus when you are already on that control?
 
thanks for sharing your working solution.
 
Gasman,

That's right, that's not necessary either, thanks for the advice.

Gr. Lampje
 

Users who are viewing this thread

Back
Top Bottom