I have an Access table with a field for social security number. It displays as:
I want to change the formatting so it will only display the last 4 digits. I can't not figure a way to do this. I've played with the FORMAT properties, but I can't find a tutorial or example on truncating data in a field or partially displaying part of a data.
You're not directly in the table, are you? Most of us never let users see the tables or queries, just forms and reports. The Right() function will work in queries, forms, reports and code, but probably not directly in a table.
You're running into an Access quirk where it doesn't like the textbox to have the same name as the field in the data. Rename the textbox to txtSSN and try it (watch out for another quirk, where Access may "helpfully" change your Right function to use the new textbox name).
Thanks Paul. I tried your tip, and I was finally able to get the RIGHT function to work with my test file. Unfortunately, renaming the text box and entering he exact same function into my live database still generates a compile error.
I even went as far as to create the same dummy table and run the report off that, but it still failed. I can't think of anything else that would be different between the two files.