Grabbing portion of field for text box...

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hello All,

I have a field that contains a phone number, for instance, but is all
together(i.e., 3105552568). I would like to have a text box on the report
show just the area code. I tried putting the following:

=Left([PhoneNo],3)

in the control source field, but to no avail.

Any help would be much appreciated.

Thanks,

Trevor
 
Hello All,

I have a field that contains a phone number, for instance, but is all
together(i.e., 3105552568). I would like to have a text box on the report
show just the area code. I tried putting the following:

=Left([PhoneNo],3)

in the control source field, but to no avail.

Any help would be much appreciated.

Thanks,

Trevor

What does 'to no avail' mean?
You get incorrect data?
You get no data at all?
You get an #error, or #Name?

It's hard to help ... as the above expression should work if the name
of the field is PhoneNo and it is included in the report's record
source.
Please try to be a bit more forthcoming, and tell us what you do get.

I suspect you are getting #Error displayed.
If that is the case, make sure the name of this control is not
"PhoneNo".
 
Fred,

I apologize for the lack of depth. I was in fact getting the "#error".
And, yes, my control was named the same as the field. As soon as I changed
the name of the control, it worked great. Thank you immensely for your help.

Thanks,

Trevor

fredg said:
Hello All,

I have a field that contains a phone number, for instance, but is all
together(i.e., 3105552568). I would like to have a text box on the report
show just the area code. I tried putting the following:

=Left([PhoneNo],3)

in the control source field, but to no avail.

Any help would be much appreciated.

Thanks,

Trevor

What does 'to no avail' mean?
You get incorrect data?
You get no data at all?
You get an #error, or #Name?

It's hard to help ... as the above expression should work if the name
of the field is PhoneNo and it is included in the report's record
source.
Please try to be a bit more forthcoming, and tell us what you do get.

I suspect you are getting #Error displayed.
If that is the case, make sure the name of this control is not
"PhoneNo".
 
Back
Top