Solved

Force upper case text in a form

Posted on 2004-09-10
3
397 Views
Last Modified: 2008-02-01
I have a simple login dialog box that has a text box (txtUser) and a Login button (cmdLogin).  The user will type their initials in the text box then clicking the login button verifies the initials and passes the txtUser to a global public variable (gstrUser).  I would like the gstrUser text to always be upper case so when they modify a record their initials are entered in the UserID field in the form.

How can I make gstrUser always be caps???

Thanks
0
Comment
Question by:beyondt
3 Comments
 
LVL 3

Accepted Solution

by:
BrentTemple earned 125 total points
ID: 12032573
When you pass the txtUser into the gstrUser, you could switch it to uppercase.   I'm assuming the command botton runs a little bit of vb.

gstrUser = UCASE(me.txtUser)

-Brent
0
 
LVL 4

Expert Comment

by:Excalibur_Software
ID: 12032969
another place you may want to add that code might be the before update event

Private Sub Form_BeforeUpdate(Cancel As Integer)

   gstrUser = Ucase(me.txtUser)

End Sub
0
 

Author Comment

by:beyondt
ID: 12034479
Thanks!!  There are many more questions to come.
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

It’s the first day of March, the weather is starting to warm up and the excitement of the upcoming St. Patrick’s Day holiday can be felt throughout the world.
In Part II of this series, I will discuss how to identify all open instances of Excel and enumerate the workbooks, spreadsheets, and named ranges within each of those instances.
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

749 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question