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 / Database Design / May 2007

Tip: Looking for answers? Try searching our database.

Input Masking

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
LEM17 - 29 May 2007 18:38 GMT
I am looking for a way to limit people from entering info in all CAPS. I
would like some help with the way to do this when the guys are entering
corporation names into our database via a form.  Our client table is made up
of individuals and corporations.  The >L<??????????? command does not work
for 2 consecutive words that should be capitalized.  Thanks in advance for
your guidance.
John W. Vinson - 29 May 2007 21:52 GMT
>I am looking for a way to limit people from entering info in all CAPS. I
>would like some help with the way to do this when the guys are entering
>corporation names into our database via a form.  Our client table is made up
>of individuals and corporations.  The >L<??????????? command does not work
>for 2 consecutive words that should be capitalized.  Thanks in advance for
>your guidance.

Input masks and validation rules are not going to be able to handle this well.
Some corporate names *are* in all caps, legitimately; most use mixed case
(you'ld want to enter J. P. Morgan rather than J. p. morgan surely!)

I'd suggest using code in the Form's BeforeUpdate event (and yes, you must use
a form; tables have no usable events) to see if the user is typing all caps.
E.g.

Private Sub txtCompanyName_BeforeUpdate(Cancel as Integer)
Dim iAns As integer
If StrComp(Me!txtCompanName, UCase(Me!txtCompanyName), 0) = 0 Then
 iAns = MsgBox("Should this be in ALL CAPS?", vbYesNoCancel)
 Select Case iAns
     Case vbYes ' do nothing
     Case vbNo ' let them edit
         Cancel = True
         Me!txtCompanyName.SetFocus
     Case vbCancel ' start over
         Cancel = True
         Me!txtCompanyName.Undo
End Select
End Sub

            John W. Vinson [MVP]
 
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.