Limit number of characters in a report textbox

dfuas

Registered User.
Local time
Today, 04:30
Joined
Jan 4, 2006
Messages
66
Hi everybody,

Is there a way to limit the number of characters displayed in a report.
Say I have a word like "Internet" on a table but on my report I want only to see the first 5 characters to be shown, in this case would be "Inter".

Is there a way to achieve this?

Thanks

dfuas
 
If you know the number of character, use the Left function to peel off the requisite number of characters in the controls record source property.
 
I have the same question. I am trying to do it with an SSN = 9 digits and I only want the last 4 digits on the report, but i don't know how to build it in expression builder.
 
llkhoutx said:
Use Right(me!SSN,4).

I put that in the record source of SSN exactly how you wrote it. Is that 'me!' the report name or the query name or is it just suppose to be how you wrote it?

I did it as you wrote it and as SSN = Right(me!SSN,4) neither seems to work.

Sorry I am new at this.

your help is greatly appreciated.
 
The control recordsource should be "= Right([SSN],4)" without the quotation marks, to display the right four digits of the social security number field. The brackets are not required, but indicates that SSN is a field in the recordsource.
 
I have attached what I am doing and maybe you can tell what is wrong and why it's not working.

I know it is the best image but if you squint you can see it.

thanks

Craig
 

Attachments

The formula is right. Therefore, SSN is not in the report's recordsource. Substitute the field in your report's recordsource which represents the social security number for SSN. Isn't that obvious?
 
It is obvious and the SSN is in the record source.

I have attached it to show you.
 

Attachments

I see SSN in the recordsource. However, the formula is right.

What are you getting in that field in the report's preview mode?
 
The error on the report is #Error.

What do you mean change the name on the text box to something other than SSN?
 
llkhoutx said:
Haven't you tried Rich's suggestion?

Please look at what I attached and see if that what you mean by changing the textbox to something other than SSN? If that is what you mean I tried that and get the same error message on the report. If I use the say box and use the code =Right([City],4) it works for the city in that box. I will play with it I think I understand it now.
 

Attachments

Last edited:
Okay I figure it out guys I have attached where I changed the name in the Textbox. it was in the other TAB and I changed the name to Last 4 and now it works...

Thanks for your patients with me. You guys are awesome. :) :)
 

Attachments

Users who are viewing this thread

Back
Top Bottom