Wonder if anyone could help me with this one?
I have to extract from a regular text file update the Post Code, the text file comes in the following format
ie: AB101BD199512394208062000QA28011791SN9S00 called [F1]in my table / query. The only data I need is the first 7/8 chr ie AB101BD BUT for this to be a reconigised PostalCode the format should be AB10 1BD I have a query which takes the easy first portion from the example Left 7 and gives me [PostalCode] AB101BD
I need then to convert this to a reconigised [PostCode] so another formula reads this and should produce my answer with the space inserted in the corect place.
PostCode: IIf([PostalCode]=5,Mid([F1],1,2)+" "+Mid([F1],3,3),IIf([PostalCode]=6,Mid([F1],1,3)+" "+Mid([F1],4,3),IIf([PostalCode]=7,Mid([F1],1,4)+" "+Mid([F1],5,3),"NO")))
NB some post codes are 5, 6 ,7 chrs with a space at 3,4 I have attached a small sample to review any help or advise appriciated.
I have to extract from a regular text file update the Post Code, the text file comes in the following format
ie: AB101BD199512394208062000QA28011791SN9S00 called [F1]in my table / query. The only data I need is the first 7/8 chr ie AB101BD BUT for this to be a reconigised PostalCode the format should be AB10 1BD I have a query which takes the easy first portion from the example Left 7 and gives me [PostalCode] AB101BD
I need then to convert this to a reconigised [PostCode] so another formula reads this and should produce my answer with the space inserted in the corect place.
PostCode: IIf([PostalCode]=5,Mid([F1],1,2)+" "+Mid([F1],3,3),IIf([PostalCode]=6,Mid([F1],1,3)+" "+Mid([F1],4,3),IIf([PostalCode]=7,Mid([F1],1,4)+" "+Mid([F1],5,3),"NO")))
NB some post codes are 5, 6 ,7 chrs with a space at 3,4 I have attached a small sample to review any help or advise appriciated.