Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

#Name? May be redundant

Status
Not open for further replies.

gr8whitewaldron

Technical User
Aug 6, 2003
25
0
0
US
I'm sure this has been answered before. On a form I want text box filled with a value calculated by the expression builder. It is used to hide most of a number, as you would a credit card number, but have the last few digits shown. Ideally, it would appear
="*****" & ([EmployeeInformation].[EmployeeNumber] Mod 1000)
(using mod 1000 to return only the last 3 digits of the number)

In the box on the form, all I get it #Name? What is up with this stuff?
Pre-Thanks
 
This error is likely due to the '([EmployeeInformation].[EmployeeNumber]' reference and not the modulus operation or the concatination of the two values. Try the field reference alone first to see if it is providing the full value. I tried "print "****" & 222222222 mod 1000" in the immediate window and got ****222 so I think that is ok.
 
Is the employee number used in any mathematical calculations? If not, why not format the field as text and use the following?

="*****" & Right([EmployeeInformation].[EmployeeNumber], 3)

Ken S.
 
Believe it or not, it would only take [EmployeeNumber], not [EmployeeInformation].[EmployeeNumber].

Thank you both for your input.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top