
Insert unicode characters in a textbox with a VB macro in Access 2000
Hello !
Does anybody know how to insert unicode characters in a textbox, at the
current cursor position, with a VB macro, in Access 2000 ?
When I use this instruction :
MyTextBox.SelText = VariableName ,
unicode characters are not actually inserted, but replaced with other
characters.
I tried several solutions to this problem (like 'MyTextBox = ... &
VariableName & ...'), but there are many complications : the textbox control
is updated (at a moment it doesn't necessarily needs to be updated), the
cursor is moved and must be put at the right place again, the text scrolls
and
the screen blinks, the 'AfterUpdate' or 'OnNotInList' events do not occur if
the unicode character is the last character inserted in the textbox, and so
on.
One other solution is to use :
AnotherTextBox.SetFocus
AnotherTextBox = VariableName
AnotherTextBox.SelStart =0
AnotherTextBox .SelLength = Len(VariableName)
DoCmd.RunCommand acCmdCopy
MyTextBox.SetFocus
MyTextBox.SelStart = ...
DoCmd.RunCommand acCmdPaste
Unfortunately, since an other control is activated, the current one is also
updated.
Is there a solution to place a string in the ClipBoard without exiting the
active control ? (like 'PutInClipBoard' in Word)
Thanks in advance
Gilles CHAREYRE