Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Exporting phone numbers and zip codes (format)???

Status
Not open for further replies.

jmlbones

Technical User
Jul 16, 2001
13
US
I have a table that stores phone numbers and zip codes as text format. A phone number looks like this 1112223333 and a zip looks like this 111112222. I am trying to export to a fixed length text file that requires phone numbers like this 111/222-3333 and zips like this 11111-2222. Is there an expression I can use in the query that I am using to export the data to allow the text file to be populated appropriately? Or, any other suggestion?
 
See my answer to your cross-post in the OTHER forum.

Joe Miller
joe.miller@flotech.net
 
Maybe

=Format(YourPhonefield,"000/000-0000")

=Format(YourZipfield, "00000-0000") DougP, MCP

Visit my WEB site to see how Bar-codes can help you be more productive
 
Look at the help file in Access for the syntax for the Left, Right and Instr functions. You can use them in your queries as expressions.

For example

Expr1:Left([Zip],5) & "-" & Right([Zip],4)


Sorry, I'm at home today and I don't remember the syntax for the Instr function and do not have Access here, or I would give you the exact syntax.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top