Capital

Kundan

Registered User.
Local time
Today, 03:05
Joined
Mar 23, 2019
Messages
118
I want a text field to store the text in capital. In Format property I typed">" both on the form as well as the table. It displays capital on the form, it is storing in capital in the table but in reports it displays in the form that is typed. What to do?
 
I cannot replicate your problem.?
I added a new field to a table, set the format to >
Added control to a form and entered lowercase text
Moved to next record and back and it shows uppercase.
Created report for table, that control also shows uppercase.

Check your control.
 
format also the Textbox in your report as >.

Gasman, already has the answer.
bring your table in Design view.
In the field's property->Format: >
 
The format property setting does not save in caps. Format property does not change entered value - it is a display setting only. The saved value is what was typed. If you want to actually save in caps, that will require code (macro or VBA).

If you have this format set in table then drag field to form or report from Field List (or let wizard build form or report object), textbox will adopt the format setting. Otherwise, manually set the property.
 
I cannot replicate your problem.?
I added a new field to a table, set the format to >
Added control to a form and entered lowercase text
Moved to next record and back and it shows uppercase.
Created report for table, that control also shows uppercase.

Check your control.

In the attached db I have typed "alabama" in PLACE field. It shows capital. But when I click PRINT ENVELOPE it prints in lower case.
 

Attachments

bring your report in design view.
select text6 [ADD 2].
on its Property->Format->Format: >
 
bring your report in design view.
select text6 [ADD 2].
on its Property->Format->Format: >

My God!!! Its tedious to do this for all the reports. Once it is stored in the table in capital all reports connected to it should automatically print capital. Why isn't it so?
 
My God!!! Its tedious to do this for all the reports. Once it is stored in the table in capital all reports connected to it should automatically print capital. Why isn't it so?

Because the Format does NOT store the value in the table as capitals (uppercase). Format only affects the display.
 
I think they will if you create the control after setting the table design.

The other option is to force the stored value to uppercase in the after update event

Code:
Me.YourControl = UCase(Me.YourControl)
 
I think they will if you create the control after setting the table design.

The other option is to force the stored value to uppercase in the after update event

Code:
Me.YourControl = UCase(Me.YourControl)

That's a good solution. Thanks. GOD BLESS YOU!!!!!!!!!!!!!!
 
My God!!! Its tedious to do this for all the reports. Once it is stored in the table in capital all reports connected to it should automatically print capital. Why isn't it so?

You have already been told, it only affects the display of the data.
 
Further to Minty's suggestion you could also run an update query on your table data to update the required field to UCase(YourFieldName).
Doing that means all existing data in that field will always be in capitals
 
@Kundan, see posts 4 and 8 for reason why data is not caps.

As already advised, if you need to modify existing data to store in caps, run UPDATE query - then use code in control AfterUpdate event to save future inputs as caps.
 
I think they will if you create the control after setting the table design.

The other option is to force the stored value to uppercase in the after update event

Code:
Me.YourControl = UCase(Me.YourControl)

In a similar manner if I want to store a number in text format like"123 345". What should I do?
 
So user enters "123345" and you want to add a space? Consistency of data is critical in string manipulation. This field will always have just digits - no other characters?
 
So user enters "123345" and you want to add a space? Consistency of data is critical in string manipulation. This field will always have just digits - no other characters?

I want space after first 3 digits. What will be the format to display and the code to store it.
 
I think they will if you create the control after setting the table design.

The other option is to force the stored value to uppercase in the after update event

Code:
Me.YourControl = UCase(Me.YourControl)

Can we use an Input Mask to ensure all that is typed is in capital? How? Will it store the typed value in capital?
 

Users who are viewing this thread

Back
Top Bottom