replace vbCrLf with ,

  • Thread starter Thread starter Tom
  • Start date Start date
T

Tom

ANy advice/suggestions on the following would be appreciated

Using Access 2002 a text field in a table a clients mail address in the
format of:

Street
Town
PostCode
County

there is now a requirement, in a new report, to have that mail address
displayed in the format of:

Street, Town, PostCode, County

For this new format how can the vbCrLf be replaced with a ,?

TIA

Tom
 
I take it you have a single field named (say) "Address", that contains
several lines?

If so you can set the Control Source of the text box on your report to
something like this:
=Replace([Address], Chr(13) & Chr(10), ", ")

Make sure the Name of this text box is not the same as the name of a field,
e.g. it must not be called Address.
 
Brilliant Allen
thanks very much

Tom
Allen Browne said:
I take it you have a single field named (say) "Address", that contains
several lines?

If so you can set the Control Source of the text box on your report to
something like this:
=Replace([Address], Chr(13) & Chr(10), ", ")

Make sure the Name of this text box is not the same as the name of a
field, e.g. it must not be called Address.

--
Allen Browne - Microsoft MVP. Perth, Western Australia.

Reply to group, rather than allenbrowne at mvps dot org.

Tom said:
ANy advice/suggestions on the following would be appreciated

Using Access 2002 a text field in a table a clients mail address in the
format of:

Street
Town
PostCode
County

there is now a requirement, in a new report, to have that mail address
displayed in the format of:

Street, Town, PostCode, County

For this new format how can the vbCrLf be replaced with a ,?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top