How do I format an output text field in a Base form?

I have social security numbers stored as a nine character varchar. I don’t want to store spaces between the sections, that would be lame. I want to show them on my form, not while inputting it, while outputting it on a form. There has to be a way to do this. I’ve tried the text box, it has no formatting ability that I can find. I’ve tried the Formatted field, but I can’t get it to work with a text field or a User-Defined field. I’ve tied X’s, C’s, *'s, _'s, 9’s and I’ve tried quoting all above. I tried a mid function to see if the formatting would take code, nope.

1 Like

It probably won’t work with a text field.

Try a “number field”.

If my answer has solved your problem, please click on the checkmark in the circle Bildbeschreibung to the left of the answer for upvote. This will tell the community that the question has been answered correctly.

1 Like

With me Windows 10 Home; Version 1909; 64-Bit | LibreOffice, Version: 6.4.0.3 (x64).

You were right it didn’t work for a text field. But it may have actually worked given the problem that I stated. It worked for about ten characters then died.I distilled the problem down to make it easier to understand the real problem. What I am actually formatting is Tracking Numbers. USPS uses all digits, and a lot of them, UPS uses digits, But has a “Z” as the second character. China Post uses 2 alphas, I think 9 digits, then 2 more alphas. That’s one of the reasons I’m using strings instead of integers. The other is that I’m not going to do any arithmetic with them, so as an old style programmer, I use strings. Strings are USUALLY much easier to format than numbers because of MID/SUBSTR functions. THANK YOU FOR YOUR HELP!!! I REALLY APPRECIATE IT. P.S. Caps are not yelling, they are emphasis.

Got It!! Used a query
SELECT
SUBSTR(TrackingNumber, 1, 4) + CHAR(32) +
SUBSTR(TrackingNumber, 5,4) + CHAR(32) +
SUBSTR(TrackingNumber, 9,4) + CHAR(32) +
SUBSTR(TrackingNumber, 13,4) + CHAR(32) +
SUBSTR(TrackingNumber, 17,4) + CHAR(32) +
SUBSTR(TrackingNumber, 21,4) AS “USPS”
FROM “Tracking”