Link to home
Start Free TrialLog in
Avatar of Gustus
Gustus

asked on

Uppercase and Next/Prvs Cmd buttons


I was just wondering about a couple of things.

Firstly I would like to force a text box to uppercase, or at least store the data entered in uppercase. I'm sure this is very simple but I can't for the life of me figure it out!

Secondly I would like a command button to continuously scroll through records (like the navigation buttons). I do not want the navigation buttons to be shown on my form therefore scrolling through records is currently very slow (click click click etc)!!!

Thanks all.
ASKER CERTIFIED SOLUTION
Avatar of shanesuebsahakarn
shanesuebsahakarn
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
two possibilities for #1)

Use the Lost Focus Event or the KeyPress Event:

Private Sub txtTextBox_LoastFocus()
   txtTextBox.Text = UCase$(txtTextBox.Text)
End Sub


or

Private sub TxtTextBox_KeyPress(KeyAscii as Integer)
   If keyAscii >= Asc("a") and KeyAscii <= asc("z") then
       KyeAscii = KeyAscii -32
   End If
End Sub

The first will allow lowercase entry, and then convert the ENTIRE text to Upppercase, when the user tabs off the text box.

The second will convert the lower case to uppercase 'on the fly', so the user will not be aware that anything has taken place.

AW
Avatar of Gustus
Gustus

ASKER


Thanks both but I am still struggling with the scrolling record button. Any ideas anyone?
No comment has been added lately, so it's time to clean up this TA.
I will leave a recommendation in the Cleanup topic area that this question is:
Accept question, points to shanesuebsahakarn
Please leave any comments here within the next seven days.
 
PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!
 
1William
EE Cleanup Volunteer