Emulate VBA function UCase

LukeSky

Registered User.
Local time
Today, 07:36
Joined
Aug 4, 2016
Messages
12
Hey, I am new here, my language native is not english, I apologize in advance for my mistakes in grammar.

I want emulate, in one macro, this VBA function/sub:

Private Sub Tip_KeyPress(KeyAscii As Integer)
KeyAscii = Asc(UCase(Chr(KeyAscii)))
End Sub

With below macro, I got uppcase text, but way is different, not is character by character, either full-string. Macro linking with event AfterUpdate of text control.

Action: SetValue
Element: [Screen].[ActiveControl]
Expression: StrConv([Screen].[ActiveControl];1)

With this macro, linked with event Change of text control:

Action: SetValue
Element: [Screen].[ActiveControl].[Text]
Expression: Ucase([Screen].[ActiveControl].[Text])

I get uppercase character by character but final string is reverse.

Any idea? Thanks.
 
why not just set the format property of the control or field to >

So regardless of what the user types, it will appear as upper case
 
Thanks for answering, I tried set format property like you say, but it has a effect not want, I am refering to change of text between lower and upper case when doing click on other control and after doing click on previous control.

Why access shows reverse string with last macro of my previous post?

I am thinking that the solución wolud be combine that macro with you propose.

Thank'u so much.
 
I don't know - I don't use macros. Why use a macro when you have vba code working?
 
I know that use VBA is more efficient but is imposed for other persons. Foro me is more easy to use VBA, too.
 

Users who are viewing this thread

Back
Top Bottom