Changing text to upper case

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

Guest

I am trying to change lower case text in a text box entered on a form to
upper case before it is appended to a table (via a SAVE button on the same
form). I tried adding a ">" to the TEXT FORMAT property of the text box,
which DOES change the lower case text to upper case when you TAB out of the
field; however when the data is appended to a table, the case reverts back to
lower case. I am having trouble finding information about using the UCase
command in a macro - any help would be appreciated!

Thanks!
 
Jim,

Using the > Format option affects the format, i.e. the way the data is
displayed, not the actual data itself.

In many cases, this is sufficient. In other words, what is stored in a
table is irrelevant, becasue you don't normally see the data in a table
anyway. So adjusting the display (format) where you *do* see it, i.e.
forms and reports, does the trick.

If you really want to provide the fuctionality for the user to be able
to enter the data in lower case, and have it converted to upper case,
you could make a macro to run on the After Update event of the textbox
on your form. The macro would be like this...
Action: SetValue
Item: [NameOfYourField]
Expression: StrConv([NameOfYourField],1)
 
Can you use Set Value?

Set Value
[Forms]![YourFormName]![Your field]
UCase([Forms]![YourFormName]![Your field])
 
Steve,
Thanks for the tip on ">"!! That makes total sense once someone explains it.
I will use that text formatting for the reports...
Really appreciate your help!!
Jim

Steve Schapel said:
Jim,

Using the > Format option affects the format, i.e. the way the data is
displayed, not the actual data itself.

In many cases, this is sufficient. In other words, what is stored in a
table is irrelevant, becasue you don't normally see the data in a table
anyway. So adjusting the display (format) where you *do* see it, i.e.
forms and reports, does the trick.

If you really want to provide the fuctionality for the user to be able
to enter the data in lower case, and have it converted to upper case,
you could make a macro to run on the After Update event of the textbox
on your form. The macro would be like this...
Action: SetValue
Item: [NameOfYourField]
Expression: StrConv([NameOfYourField],1)

--
Steve Schapel, Microsoft Access MVP
I am trying to change lower case text in a text box entered on a form to
upper case before it is appended to a table (via a SAVE button on the same
form). I tried adding a ">" to the TEXT FORMAT property of the text box,
which DOES change the lower case text to upper case when you TAB out of the
field; however when the data is appended to a table, the case reverts back to
lower case. I am having trouble finding information about using the UCase
command in a macro - any help would be appreciated!

Thanks!
 
Karl,
Thanks for the Set Value information! I will brew up a macro using it, as it
sounds as if that will do the trick!
Appreciate your help on this!!
Jim



KARL DEWEY said:
Can you use Set Value?

Set Value
[Forms]![YourFormName]![Your field]
UCase([Forms]![YourFormName]![Your field])

--
KARL DEWEY
Build a little - Test a little


Jim said:
I am trying to change lower case text in a text box entered on a form to
upper case before it is appended to a table (via a SAVE button on the same
form). I tried adding a ">" to the TEXT FORMAT property of the text box,
which DOES change the lower case text to upper case when you TAB out of the
field; however when the data is appended to a table, the case reverts back to
lower case. I am having trouble finding information about using the UCase
command in a macro - any help would be appreciated!

Thanks!
 
Back
Top