Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Table set up

0 views
Skip to first unread message

Mike

unread,
Nov 10, 2009, 10:29:31 PM11/10/09
to
How can I make sure that when data is entered in a table the data is all
caps. Example, I need state (two positions) to be all capital letters even if
the state is entered in initial caps.

I cannot figure it out....

Thanks,
--
Mike

Tom van Stiphout

unread,
Nov 10, 2009, 10:50:34 PM11/10/09
to
On Tue, 10 Nov 2009 19:29:31 -0800, Mike
<Mi...@discussions.microsoft.com> wrote:

Alternatively you can set the Format property of a text box to ">", or
perhaps use the UCase(myField) function in query.

-Tom.
Microsoft Access MVP

Duane Hookom

unread,
Nov 10, 2009, 11:26:10 PM11/10/09
to
I would use code in the after update event of the text box like:
If Not IsNull(Me.txtState) Then
Me.txtState = UCase(Me.txtState)
End If
--
Duane Hookom
Microsoft Access MVP

Peter Hibbs

unread,
Nov 11, 2009, 7:20:46 AM11/11/09
to
You could try this in the KeyPress event of the Text box :-

KeyAscii = Asc(UCase(Chr(KeyAscii)))

HTH

Peter Hibbs.

On Tue, 10 Nov 2009 19:29:31 -0800, Mike
<Mi...@discussions.microsoft.com> wrote:

Mike

unread,
Nov 11, 2009, 7:50:01 AM11/11/09
to
Thanks, the > in the Format worked great...............thanks again
--
Mike


"Tom van Stiphout" wrote:

> .
>

John W. Vinson

unread,
Nov 11, 2009, 12:00:39 PM11/11/09
to
On Wed, 11 Nov 2009 04:50:01 -0800, Mike <Mi...@discussions.microsoft.com>
wrote:

>Thanks, the > in the Format worked great...............thanks again

Just be aware that this Format merely *displays* the text in upper case - if
the user types "az" then the field will contain "az", and that's what you'll
see if you use it in queries, forms, etc. The Table Datasheet will show "AZ"
because of the format, but it doesn't make any permanent change to the data.
--

John W. Vinson [MVP]

0 new messages