Allow Caps Only in Text Fields

C

chris

We do mass mailings and when we send our prospect list to our printing
company they require that our exported text file is in capital letters only.
How can I make it so people can only enter a new address in capital letters?
 
J

John W. Vinson

We do mass mailings and when we send our prospect list to our printing
company they require that our exported text file is in capital letters only.
How can I make it so people can only enter a new address in capital letters?

I'd suggest fixing the entry after it's added - either in the process of
putting the data in the field, or in the export process.

To fix it as users enter the data, use a Form for data entry (users should not
be working directly in tables); in the AfterUpdate event of each textbox that
needs to be in all caps put code like

Private Sub textboxname_AfterUpdate()
Me!textboxname = UCase(Me!textboxname)
End Sub


Personally I'd rather leave the data as entered (I don't like all caps, IT'S
HARD TO READ AND LOOKS LIKE SHOUTING) and do it in the export process; rather
than exporting from the table directly, use a Query with a calculated field

ExpFieldname: UCase([fieldname])

for each such field.
 
C

chris

John W. Vinson said:
We do mass mailings and when we send our prospect list to our printing
company they require that our exported text file is in capital letters only.
How can I make it so people can only enter a new address in capital letters?

I'd suggest fixing the entry after it's added - either in the process of
putting the data in the field, or in the export process.

To fix it as users enter the data, use a Form for data entry (users should not
be working directly in tables); in the AfterUpdate event of each textbox that
needs to be in all caps put code like

Private Sub textboxname_AfterUpdate()
Me!textboxname = UCase(Me!textboxname)
End Sub


Personally I'd rather leave the data as entered (I don't like all caps, IT'S
HARD TO READ AND LOOKS LIKE SHOUTING) and do it in the export process; rather
than exporting from the table directly, use a Query with a calculated field

ExpFieldname: UCase([fieldname])

for each such field.
--

John W. Vinson [MVP]
.
The Code worked Perfect! Of course you already knew that but it was exactly what I was looking for. Thanks so much!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top