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 Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

expression in report returns error...with query it works ? 1

Status
Not open for further replies.

PenelopeC

Technical User
May 12, 2003
72
US
Hi
I have a phone number field that may or may not have a country code (two digits). I want to limit the size of the phone number on the report to 10 digits - most calls are NOT to foreign countries. So I'm trying to return the right 10 most numbers to give me the phone number.

For the control on the report I have..

=RIGHT([CalledNo],10)

...which should give me the ten digit number. I need to use this so I don't have a bunch of (l)users asking me why there are zeros in front of the number they called. (I get the data this way from another vendor)

When I run the report I get an error. If I put this expression in a query it works fine. I'm using Access97 with the latest patch (just checked and installed) on a Windows2K box. I know I could just run a query - but why should I have to if the data's right in the table? Any pointers? Thanks!



PenelopeC
~~~>-/O~~~~~swimming right along
 
Penelope,

One cause might be using functions like Right on bound controls. Try adding a new unbound text box to the report with your Right function as its control source.

Let me know if this helps....

Hoc nomen meum verum non est.
 
Quite possibly your text box name is "CalledNo". You would need to change the name to something like txtCalledNo.


Duane
MS Access MVP
 
dhookom you were absolutely right!

Thanks! I new it was something dorky - that's what I get for using the report wizard! I'm giving you a star :)

PenelopeC
~~~>-/O~~~~~swimming right along
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top