Trim the last four characters in a string

soundsfishy

Registered User.
Local time
Today, 23:25
Joined
Sep 25, 2002
Messages
174
someone idot in our dept didnt create separate fields for an address. At the moment they have a one field that stores the whole address e.g 17 White Street Fairfield 3014.

What I need to do for the time being is extract the zip codes and store in a zipcode field in the same table.

Im kinds familar with and GTrim but in the case the address is in segments and im not sure how the extract the post code or anything that is 4 characters from the right.

Dim strZip As String
strPost = Right$(Address, 4)
 
Last edited:
Thanks Milo

but I need to know how extract the zip codes with the exsiting records and store the those zips in zip field in the same table.

am i making sense? would an append query work?


Say I have

address Zip
17 White Street Fairfield 3014 ( to be moved here)
 
Thanks I thought that was the way to go..I just needed a little prodding to get the braining functioning

Thanks Rich


Milo , =Right([MyField], 4) will coming in handy for another DB
 
soundsfishy said:
Milo , =Right([MyField], 4) will coming in handy for another DB

It'll come in handy for this one too when you put the expression into the UPDATE query.
 
Yeah I know!..hehe tried it in the update query and it worked nicely..!

thanks for help
 

Users who are viewing this thread

Back
Top Bottom