Connecting Tech Pros Worldwide Forums | Help | Site Map

removing last letter in data for a report

Karlwasley
Guest
 
Posts: n/a
#1: Nov 12 '05
HI
I have a ata feild with a stand code EG A23H, there are three letters H, W & C
but i do not wish them to be printed in the reports. How can i remove this
letter during a query thatr creates a report so that it is not on the final
printout
thanks in advance
Karl

fredg
Guest
 
Posts: n/a
#2: Nov 12 '05

re: removing last letter in data for a report


On 18 Feb 2004 17:41:22 GMT, Karlwasley wrote:
[color=blue]
> HI
> I have a ata feild with a stand code EG A23H, there are three letters H, W & C
> but i do not wish them to be printed in the reports. How can i remove this
> letter during a query thatr creates a report so that it is not on the final
> printout
> thanks in advance
> Karl[/color]
In the query?
NewColumn:Left([FieldName],Len([FieldName])-1)
Include this NewColumn field in the report.

You can also do it in the report itself.
Just use the above expression in an unbound control's control source:
=Left([FieldName],Len([FieldName])-1)
--
Fred
Please only reply to this newsgroup.
I do not reply to personal email.
Brendan Reynolds
Guest
 
Posts: n/a
#3: Nov 12 '05

re: removing last letter in data for a report


In a query ...

SELECT Left$([FieldName], Len([FieldName])-1) AS SomeAlias FROM SomeTable

Or in the control source of the text box on the report ...

=Left$([FieldName], Len([FieldName])-1)

See the Left() and Len() functions in the help file for details.

--
Brendan Reynolds

"Karlwasley" <karlwasley@aol.com> wrote in message
news:20040218124122.13722.00001749@mb-m27.aol.com...[color=blue]
> HI
> I have a ata feild with a stand code EG A23H, there are three letters H, W[/color]
& C[color=blue]
> but i do not wish them to be printed in the reports. How can i remove this
> letter during a query thatr creates a report so that it is not on the[/color]
final[color=blue]
> printout
> thanks in advance
> Karl[/color]


Closed Thread


Similar Microsoft Access / VBA bytes