Insert unicode characters in a textbox with a VB macro in Access 2000 
Author Message
 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



Wed, 30 Jul 2003 04:40:40 GMT  
 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



Wed, 30 Jul 2003 04:40:40 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Insert unicode characters in a textbox with a VB macro, in Access 2000

2. Inserting Unicode Characters in a TextBox (Access)

3. VB, ADO and Access 2000 Unicode Database

4. how to insert unicode character in a string

5. Displaying Unicode Characters in a textbox?

6. Using VB 2005 to insert record into Access 2000

7. Macro access 2000 / excel 2000

8. Problems inserting text in Word 2000 with a macro

9. Run Access 2000 Macro w/in a VB 6 App

10. Starting Access 2000 macro from VB

11. Access 2000 - calls to Access.exe to document macros

12. Importing an Access 2000 table into another Access 2000 database with VB Code

 

 
Powered by phpBB® Forum Software