Is this possible ??

  • Thread starter Thread starter Earl.AKA J.Alladien in access forum!!
  • Start date Start date
E

Earl.AKA J.Alladien in access forum!!

Hello guys,

I have a text field with descriptions as follows:

SPOT TWIST GU10 50W BLIS 16751
LAMPTB 400W E40 GE MHL 30052

I want to format them as such so that the last 5 digits of the string diplay
as follows:

SPOT TWIST GU10 50W BLIS *****
LAMPTB 400W E40 GE MHL *****

How should I do this?
Thanks in advance!
 
Left(YourFieldName, Len(YourFieldName,-5)) & "*****"

Regards

Kevin


"Earl.AKA J.Alladien in access forum!!"
 
Slight correction
Left(YourFieldName, Len(YourFieldName),-5) & "*****"

if used in a query it would need to be an expression as :
NewView: Left(YourFieldName, Len(YourFieldName),-5) & "*****"
 
That won't really work either, for 2 reasons.

First, unless the form was read only and data entry didn't matter, there'd
be no way to enter data.
And for the same reason, any data entry would fail.

I suggest splitting into 2 separate fields, the first including everything
except the last 5 digits, then have the form's text box use an Input Mask
set to:

Password

for the last 5 digits.
 
Hello Arvin,Kevin,

Thanks for your reply
Kevin,First of all I get following message when using the function in my
query "has wrong number of arguments"

Arvin,I just need to format that field for display on my report so not on
any form or something.
I just don't want the people to whom i will send that report to see the last
5 digits of that specific text field.
Is there no other way then what you suggested?
 
Arvin,I just need to format that field for display on my report so not on
any form or something.
I just don't want the people to whom i will send that report to see the last
5 digits of that specific text field.
Is there no other way then what you suggested?

Just set the Control Source property of the textbox *ON THE REPORT* to

Left(YourFieldName, Len(YourFieldName)-5) & "*****"

If it's only the report you are concerned about you don't need to worry about
the form or about data entry.

I corrected a small error in the expression (there was an extraneous comma).
 
Thanks John,

That did it!

John W. Vinson said:
Just set the Control Source property of the textbox *ON THE REPORT* to

Left(YourFieldName, Len(YourFieldName)-5) & "*****"

If it's only the report you are concerned about you don't need to worry about
the form or about data entry.

I corrected a small error in the expression (there was an extraneous comma).
 
Back
Top