creating mask in report

travismp

Registered User.
Local time
Today, 18:41
Joined
Oct 15, 2001
Messages
386
i have a field [EmpSS] that i want to mask in the report not in the query.

I make an unbound field in the report then asign this code to the control source. It brings up an error.
Code:
="XXX-XX-" & Right([EmpSS],4)

Can I asign a mask at the report level? I know how to do it at the query level, but that throws my data results off. I need it done in the report.
 
Make sure that there isn't a control named EmpSS as well as the field [EmpSS]. If the control is the same name, rename it to txtEmpSS and then if you do the formula will likely change (due to autocorrect) so you'll have to remove the txt from the formula.

One thing to note - when you have a formula with a field in it in a report, you need to reference the field and not the control (contrary to forms) so you can't have the controls named the same otherwise Access runs into ambiguity problems.
 
That should work. Make sure you don't have a control with the same name as the field, as that can cause an error.
 
It's the higher elevation here. It slows down the reflexes. :p
 
So I need to keep column [EmpSS] in my report, but name it "EmpSS_txt" then create a new unbound field and add my formula:

="XXX-XX-" & Right([EmpSS_txt],4)

And the name of the new field does not matter. Then 'hide' the original that I do not want them to see???
 
I don't think you quite got it. You just need to rename the CONTROL (textbox) that houses [EmpSS] to txtEmpSS. The control with the name txtEmp55 will still have your formula as it's controlsource, and you want
Code:
="XXX-XX-" & Right([EmpSS],4)
 
Right... I see where you guys are heading with that. Thanks and it looks like it will work great. Thanks.
 

Users who are viewing this thread

Back
Top Bottom