KEEPING FORMAT IN ACCESS

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I am trying to establish a database in Microsoft Access 2003 which takes a
few of the fields and converts the values into uppercase. I have used the
">" format command and it makes it uppercase in the user interface, however
when I go to use the database elsewhere the entries are in the same case they
were entered as (ie some are lowercase and it is therefore not formatting
record entries correctly).

Any assistance would be much appreciated.
 
I am trying to establish a database in Microsoft Access 2003 which takes a
few of the fields and converts the values into uppercase. I have used the
">" format command and it makes it uppercase in the user interface, however
when I go to use the database elsewhere the entries are in the same case they
were entered as (ie some are lowercase and it is therefore not formatting
record entries correctly).

Any assistance would be much appreciated.

The Format property just controls how the field is displayed - not
stored.

To permanently UPPERCASE the values in a field, either run an Update
query updating the field to UCase([fieldname]); or if you're entering
data using a Form (recommended!) use the AfterUpdate event of the
field's textbox:

Private Sub txtFieldname_AfterUpdate()
Me!txtFieldname = UCase(Me!txtFieldname)
End Sub

John W. Vinson[MVP]
Join the online Access Chats
Tuesday 11am EDT - Thursday 3:30pm EDT
http://community.compuserve.com/msdevapps
 
Hi John,

Thankyou for your words. I was actually trying to run an update query but I
was misinformed and was trying to use an Upper(fieldname) command. It is
working fine now. Has anyone ever told you you're a legend?

Just a rhetorical question, what is the point of the formatting "feature"
when you are actually designing your database in design view if it doesn't
actually format the entries??

Jason Jamieson

John Vinson said:
I am trying to establish a database in Microsoft Access 2003 which takes a
few of the fields and converts the values into uppercase. I have used the
">" format command and it makes it uppercase in the user interface, however
when I go to use the database elsewhere the entries are in the same case they
were entered as (ie some are lowercase and it is therefore not formatting
record entries correctly).

Any assistance would be much appreciated.

The Format property just controls how the field is displayed - not
stored.

To permanently UPPERCASE the values in a field, either run an Update
query updating the field to UCase([fieldname]); or if you're entering
data using a Form (recommended!) use the AfterUpdate event of the
field's textbox:

Private Sub txtFieldname_AfterUpdate()
Me!txtFieldname = UCase(Me!txtFieldname)
End Sub

John W. Vinson[MVP]
Join the online Access Chats
Tuesday 11am EDT - Thursday 3:30pm EDT
http://community.compuserve.com/msdevapps
 
Hi John,

Thankyou for your words. I was actually trying to run an update query but I
was misinformed and was trying to use an Upper(fieldname) command. It is
working fine now. Has anyone ever told you you're a legend?

Just a rhetorical question, what is the point of the formatting "feature"
when you are actually designing your database in design view if it doesn't
actually format the entries??

Well, sometimes you want to store the data in one way and display it
in another. I can imagine, for instance, wanting to store people's
names in proper case ("name" case maybe, e.g. "van Hooft" and
"MacKeith"), but to be able to print nametags in all caps.

John W. Vinson[MVP]
Join the online Access Chats
Tuesday 11am EDT - Thursday 3:30pm EDT
http://community.compuserve.com/msdevapps
 

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

Back
Top