Solved

Force upper case text in a form

Posted on 2004-09-10
3
392 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

6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

Join & Write a Comment

When you are entering numbers in a speadsheet, and don't remember what 6×7 is, you just type “=6*7" instead. It works in every cell! This is not so in Access. To enter the elusive 42 in a text box, you have to find a calculator, and then copy the re…
I see at least one EE question a week that pertains to using temporary tables in MS Access.  But surprisingly, I was unable to find a single article devoted solely to this topic. I don’t intend to describe all of the uses of temporary tables in t…
Familiarize people with the process of utilizing SQL Server stored procedures from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Micr…
In Microsoft Access, when working with VBA, learn some techniques for writing readable and easily maintained code.

747 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

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now