Re: Fixing the extract table problem
- From: strive4peace <strive4peace2006@xxxxxxxxx>
- Date: Mon, 12 Mar 2007 18:29:41 -0400
Hi Tom
"it doesn't matter what the table column is set to"
if you are using a query to expost, the equation should take priority as the data is converted to text. You need to export the query, NOT the table
if importing to Excel, even though it is text, Excel will interpret it correctly as a number -- as should Access if you bring it back in
more ideas are in post to your previous response
Warm Regards,
Crystal
*
(: have an awesome day :)
*
MVP Access
Remote Programming and Training
strive4peace2006 at yahoo.com
*
CD Tom wrote:
I just realized that I still have the default windows setting for decimals to 3, when I changed it back to 2 the export of the file went back to only extracting 2 decimals. It sure looks like access is using the windows setting to export the table, and it doesn't matter what the table column is set to. When I do the export through the menus and can see the data before it exports it out to the .txt file it shows there are 3 decimals but when you look at the exported file there are only 2 decimals exported. I don't know what to do now unless there is a different way I could do the backup without making a complete backup of the whole database. Do you have any other ideas..
Tom
"strive4peace" wrote:
Hi Tom,
can you post the SQL for the query you are using to export?
from the menu when you are in design or data*** view of the Query -->
View, SQL
if you are exporting, you need to use acExportDelim, not acimportdelim
can you explain why you are exporting? What is being done with the exported information?
Warm Regards,
Crystal
*
(: have an awesome day :)
*
MVP Access
Remote Programming and Training
strive4peace2006 at yahoo.com
*
CD Tom wrote:Now here's a funny thing when I do the import from the file menu and select the exported .txt file it works fine, but when I do it with the docmd.transfertext acimportdelim command it comes up with the error about the field not being in the table. I've set the headers off in both the export and the import command.
CD
"strive4peace" wrote:
Hi Tom,
use a query to do your export
field --> Fieldname_ : format([fieldname],"#,##0.000")
where the columnname is the fieldname with an underscore after it -- still looks like the fieldname but is actually different ;)
Warm Regards,
Crystal
*
(: have an awesome day :)
*
MVP Access
Remote Programming and Training
strive4peace2006 at yahoo.com
*
CD Tom wrote:I posted an earlier question regarding the extracting for a table that has number fields with 3 decimals, and when you extract the table to a .txt file only 2 decimals will come across. When you do the extract using the export command you can see that the field shows the 3 decimals but after the extract only 2 are in the .txt file. The only way I was able to resolve this problem was to go into the control panel of Windows XP and select the date,time, language settings the the regional and language option and customize the Number section to 3 decimals. Now for my question is there any way to change that automatically using code. I have customers using the export function to backup there data and if they have a problem to send me the backed up .txt files. I would like to be able to change the number and then change it back after the export is done. Hopefully someone out there will have some kind of an answer.
Thanks in advance for any help.
CD Tom
- References:
- Re: Fixing the extract table problem
- From: strive4peace
- Re: Fixing the extract table problem
- From: strive4peace
- Re: Fixing the extract table problem
- From: CD Tom
- Re: Fixing the extract table problem
- Prev by Date: Re: Move from one page to another on a tab control
- Next by Date: Re: Fixing the extract table problem
- Previous by thread: Re: Fixing the extract table problem
- Next by thread: Re: Form with Finite selectable records.
- Index(es):