Field Format in Forms

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

Guest

Ok so I have a field on a form that is controlled by a table and they both
have a format of ">". Which means that all caps will be used even if someone
types in lower case. It seems to work but when someone types in it using
lower case it does change to upper case but when I run a report and this data
shows up on the report it shows up in lower case. And when you click back in
that field on the form it also changes back to lower case and then when you
click out of the field it goes back to upper case. Any ideas?
 
What property is set to "always"? Don't get confused with how a value is
stored vs. how the data is displayed.
 
The "display when" property on the format tab of this particular field in the
form I am using. I guess I'm a little confused where this display value is.
 
The Display When property is used only to set the control's visible property
if the form gets printed. If you ever wanted to print a form, you probably
would not want to show command buttons. You could set their Display When to
"Screen Only".
 
Ok so how do I fix my original problem?

Duane Hookom said:
The Display When property is used only to set the control's visible property
if the form gets printed. If you ever wanted to print a form, you probably
would not want to show command buttons. You could set their Display When to
"Screen Only".
 
You have stated a condition but not exactly what you would like. I assume
you want all text entered to be converted and stored in upper case. If this
is correct, one method is to add code to the after update event of your text
boxes like:

Me.txtMyText = UCase(Me.txtMyText)

You can also trap keystrokes and change the Ascii value
Private Sub txtMyText_KeyPress(KeyAscii As Integer)
If KeyAscii >= Asc("a") And KeyAscii <= Asc("z") Then
KeyAscii = KeyAscii - 32
End If
End Sub
 
Back
Top