Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Forms Programming / April 2005

Tip: Looking for answers? Try searching our database.

Change licence plate letters to upper case

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Paul B. - 11 Jan 2005 20:13 GMT
I've read through some of the post here on changing to upper case, and I
cannot figure out how to apply it....

If the user enters a licence plate of 1553hs, I want to change it to 1553HS.
This would also apply to avd123, being changed to AVD123.

Would a For - Next loop be required to test each character to determine if
it is a letter or number, then change lower case letters to upper case and
rebuild the string?

Thanks in advance
Graeme Richardson - 11 Jan 2005 20:24 GMT
When are you wanting to change to UCase?

If it's as the user types a character into the field then trap the KeyPress
event

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

If you want to run on data that's already stored then run an update query
UPDATE Table1 SET Table1.LicenceNo = UCase([LicenceNo]);

HTH, Graeme
Joe Christopher - 11 Jan 2005 20:26 GMT
How about the UCase function?

You can use something like this:

Dim LowerCase, UpperCase
LowerCase = "1553hs"   ' String to convert.
UpperCase = UCase(LowerCase)   ' Returns "1553HS".
Rick B - 11 Jan 2005 20:39 GMT
To correct existing entries, create an update query...

UPDATE SomeTable SET SomeTable.License = UCase([License]);

Rick B

> I've read through some of the post here on changing to upper case, and I
> cannot figure out how to apply it....
[quoted text clipped - 7 lines]
>
> Thanks in advance
tvh - 11 Jan 2005 20:51 GMT
Why not simply go to the table's design view and type a ">" in the format
field?

> I've read through some of the post here on changing to upper case, and I
> cannot figure out how to apply it....
[quoted text clipped - 7 lines]
>
> Thanks in advance
Paul B. - 11 Jan 2005 21:07 GMT
Wow, talk about many different way to do one thing...

Thanks everyone, I'm sure that all your suggestions will come in handy at
some point.

Cheers

> Why not simply go to the table's design view and type a ">" in the format
> field?
[quoted text clipped - 10 lines]
> >
> > Thanks in advance
Brendan Reynolds - 11 Jan 2005 21:23 GMT
You've probably already gathered this from the previous responses, Paul, but
in case any confirmation is needed, you don't have to check whether the
character is a number, letter etc., you can just go ahead and call UCase on
the entire content of the text box, UCase doesn't raise any error if the
field contains numbers, punctuation marks or symbols, nor does it change
them, it just silently ignores them.

Signature

Brendan Reynolds (MVP)
http://brenreyn.blogspot.com

The spammers and script-kiddies have succeeded in making it impossible for
me to use a real e-mail address in public newsgroups. E-mail replies to
this post will be deleted without being read. Any e-mail claiming to be
from brenreyn at indigo dot ie that is not digitally signed by me with a
GlobalSign digital certificate is a forgery and should be deleted without
being read. Follow-up questions should in general be posted to the
newsgroup, but if you have a good reason to send me e-mail, you'll find
a useable e-mail address at the URL above.

> Wow, talk about many different way to do one thing...
>
[quoted text clipped - 21 lines]
>> >
>> > Thanks in advance
Paul B. - 11 Jan 2005 21:33 GMT
Yes I figured that as you said....and Thanks.

> You've probably already gathered this from the previous responses, Paul, but
> in case any confirmation is needed, you don't have to check whether the
[quoted text clipped - 28 lines]
> >> >
> >> > Thanks in advance
2.0 to 2000 converter - Bruce - 22 Apr 2005 02:13 GMT
Paul, are you also aware that you can use > within the Input Mask of the
field on the form.  This would convert it to upper case as they enter it,
instead of having to worry about upper caseing it later.

Bruce.
****************

> I've read through some of the post here on changing to upper case, and I
> cannot figure out how to apply it....
[quoted text clipped - 7 lines]
>
> Thanks in advance
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.