Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Reports / Printing / April 2008

Tip: Looking for answers? Try searching our database.

Exporting into Text Format

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Ven - 18 Apr 2008 14:15 GMT
I'm exporting a table into text format the problem is the alignment of
decimal points....

Here is an example:
   
Result should be:

   12.00
 123.00
    1.32
1234.12      

When I exported it, it goes like this..

12.00  
123.00
1.32
1234.12

Anyone know how to do this?
THANKS!!
Klatuu - 18 Apr 2008 17:23 GMT
That is because when exporting to a text file, everything is converted to
text and therefore left aligned.  There is no way to set justification in
this situation.  There is; however, a trick you can use that will make it
look justified.  What this expression does is return a string of a specified
width with leading spaces so the numbers appear to be right justified.  First
you have to determine the maximum width for the column and use that as the
number in the expression.  In the example below, I am using a column width of
12 characters.

Justified: Space(12-Len(format([NumField],"0.00"))) &
Format([NumField],"0.00")
Signature

Dave Hargis, Microsoft Access MVP

> I'm exporting a table into text format the problem is the alignment of
> decimal points....
[quoted text clipped - 17 lines]
> Anyone know how to do this?
> THANKS!!
Ven - 19 Apr 2008 15:25 GMT
>That is because when exporting to a text file, everything is converted to
>text and therefore left aligned.  There is no way to set justification in
[quoted text clipped - 12 lines]
>> Anyone know how to do this?
>> THANKS!!

Thanks! I've tried before using this code right(("     "&[field]),5) as
[alias] it didn't work though..
Those who have no cents just display the whole number which should be decimal
( .00).

Do you know also about why when you export a file into excel format then
transfer the excel file to another computer and when you open it and try to
edit or print it, it shows an error something like this "Not enough resources
to... " The computer's OS is windows98 and have to save the excel as 2003
format. When I checked the comps specs, there's no problem in it. I don't get
it because when I transfer it again to another computer which is also
windows98 it work there, I can even edit or print the excel file. What does
the error mean? Does it have something to do with the computer or the
conversion of excel2007 to 2003 but the file works to another w98 comp? Any
idea with this error?
Klatuu - 21 Apr 2008 14:37 GMT
This question would be better asked in an Excel newsgroup.  Wish I could
help, but I am not that savy when it comes to Excel.
Signature

Dave Hargis, Microsoft Access MVP

> >That is because when exporting to a text file, everything is converted to
> >text and therefore left aligned.  There is no way to set justification in
[quoted text clipped - 28 lines]
> conversion of excel2007 to 2003 but the file works to another w98 comp? Any
> idea with this error?
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.