Table set up

M

Mike

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,
 
T

Tom van Stiphout

On Tue, 10 Nov 2009 19:29:31 -0800, Mike

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
 
D

Duane Hookom

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
 
P

Peter Hibbs

You could try this in the KeyPress event of the Text box :-

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

HTH

Peter Hibbs.
 
J

John W. Vinson

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.
 

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

Similar Threads


Top