G
Guest
Hello,
I have tried to create a function to make the first letter of user-input in
a textbox uppercase, if it is not already so.
The code I wrote is really very stupid:
Public Function FirstUp(s As String) As String
If Len(s) > 0 Then
FirstUp = UCase(Left(s, 1)) + Mid(s, 2)
Else
FirstUp = s
End If
End Function
Now, I thought that when I put a call to this function in for example the
event After Update of a textbox Dopeling like
After Update ...... = FirstUp ( [Dopeling] )
that input as "egbert" would be converted to "Egbert".
But nothing happens, how come?
Thanks for any help,
Greetings, Menne
I have tried to create a function to make the first letter of user-input in
a textbox uppercase, if it is not already so.
The code I wrote is really very stupid:
Public Function FirstUp(s As String) As String
If Len(s) > 0 Then
FirstUp = UCase(Left(s, 1)) + Mid(s, 2)
Else
FirstUp = s
End If
End Function
Now, I thought that when I put a call to this function in for example the
event After Update of a textbox Dopeling like
After Update ...... = FirstUp ( [Dopeling] )
that input as "egbert" would be converted to "Egbert".
But nothing happens, how come?
Thanks for any help,
Greetings, Menne