reformatting an address field

HarrySpencer

Registered User.
Local time
Today, 08:34
Joined
Apr 10, 2007
Messages
25
Hi,

I have an address field currently formatted 1 Streetname, city, post/zip code it is displayed on a form within a multi-line textbox. I'd like to change the commas to a line return so it will display

1 streetname
city
postcode

I was thinking that a small macro might go through each record and change the comma to a line return? But not sure where to start exactly?

many thanks in advance. Harry
 
personally, I would create a seperate column for each line of the address.
 
In your form you could use the Replace function, make the first address text box invisible and add another text box with the control source like this

=Replace([nameofField],",",Chr$(13) & Chr$(10))

The Chr$(13) & Chr$(10) put the carriage return line feed in
 
thanks Micheal for the info, will try out that replace function.

thanks also Dennisk, I would have done that too but the old DB had just a single field and had to import from that and the address all vary in length and format. Wasn't quite sure how to go about changing it.

thanks again. Harry
 

Users who are viewing this thread

Back
Top Bottom