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 wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Right Justify a field in Access

Status
Not open for further replies.

CTRosebud

Technical User
Mar 5, 2003
3
US
I have a text file that I import into Access. The field comes in as "Double". I need to know how to right justify the filed. I have the following code Expr1: Space(17-Len(Format([Field13],"Currency"))) & Format([Field13],"Currency")but I need to change the field to text for this to work and it puts dollar signs in. I need the data to look like 182.12 right justify so that when I export back out to a text file it is to the right without the dollar signs
 
you can set up an import spec to over-ride the field type to text/string. you cannot force a (numeric) field type to a specific 'text width' or justification within a table, although you could do so via a query and some functions. In a query, you could use something like:

Expr1: Right(String(17, "0") & Trim(CStr([Field13])), 17)

and then use transfertext with appropiate args to send the query results back to a text file

MichaelRed
m.red@att.net

Searching for employment in all the wrong places
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top