Trimming a text field, still unresolved

fhs

Registered User.
Local time
Today, 08:05
Joined
Aug 8, 2001
Messages
68
:confused: Here's the problem and I understand that a few folks have responded to this already and I appreciate their effort, but the problem is still unresolved. I have a text field in a table called [Address]with data like this: 234 Elm Street (ZIP 2345). In a query, I want to rename the field to New Address and trim off the right-most nine characters so that the query result will be 234 Elm Street, with no (ZIP 2345). Just how can we do this? What would be the expression in the query? Thanks beforehand to all trying to assist. Please let me know soon.
 
This may help

If the format of the string is always the same and the zip is always encapsulated by the bracket then you could use this expression

Left([Address],(InStr(1,[Address],"(")-1))
 
Just tried it. The field data is typically 3456 West Elm Street (ZIP 3456). I placed "New Address:Left([Address],(InStr(1,[Address],"(")-1))," (without the quotes, of course) and the query result was 3456 West Elm Street (ZIP 2345). What should I try next? :(
 
You nailed it, Super! That did it! You are a SuperRock!
 

Users who are viewing this thread

Back
Top Bottom