Capital (1 Viewer)

Kundan

Registered User.
Local time
Yesterday, 23:01
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?
 

Gasman

Enthusiastic Amateur
Local time
Today, 07:01
Joined
Sep 21, 2011
Messages
14,265
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.
 

arnelgp

..forever waiting... waiting for jellybean!
Local time
Today, 14:01
Joined
May 7, 2009
Messages
19,233
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: >
 

June7

AWF VIP
Local time
Yesterday, 22:01
Joined
Mar 9, 2014
Messages
5,470
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.
 

Kundan

Registered User.
Local time
Yesterday, 23:01
Joined
Mar 23, 2019
Messages
118
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

  • Van Col.zip
    126.2 KB · Views: 86

arnelgp

..forever waiting... waiting for jellybean!
Local time
Today, 14:01
Joined
May 7, 2009
Messages
19,233
bring your report in design view.
select text6 [ADD 2].
on its Property->Format->Format: >
 

Kundan

Registered User.
Local time
Yesterday, 23:01
Joined
Mar 23, 2019
Messages
118
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?
 

Galaxiom

Super Moderator
Staff member
Local time
Today, 16:01
Joined
Jan 20, 2009
Messages
12,852
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.
 

Minty

AWF VIP
Local time
Today, 07:01
Joined
Jul 26, 2013
Messages
10,371
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)
 

Kundan

Registered User.
Local time
Yesterday, 23:01
Joined
Mar 23, 2019
Messages
118
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!!!!!!!!!!!!!!
 

Gasman

Enthusiastic Amateur
Local time
Today, 07:01
Joined
Sep 21, 2011
Messages
14,265
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.
 

isladogs

MVP / VIP
Local time
Today, 07:01
Joined
Jan 14, 2017
Messages
18,216
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
 

June7

AWF VIP
Local time
Yesterday, 22:01
Joined
Mar 9, 2014
Messages
5,470
@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.
 

Kundan

Registered User.
Local time
Yesterday, 23:01
Joined
Mar 23, 2019
Messages
118
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?
 

June7

AWF VIP
Local time
Yesterday, 22:01
Joined
Mar 9, 2014
Messages
5,470
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?
 

Kundan

Registered User.
Local time
Yesterday, 23:01
Joined
Mar 23, 2019
Messages
118
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.
 

Kundan

Registered User.
Local time
Yesterday, 23:01
Joined
Mar 23, 2019
Messages
118
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

Top Bottom