473,394 Members | 1,737 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

Docmd.Transfertext AcExportDelim problems with a 3 digit integer

489 256MB
I have a table with columns Data Type as Number they are formatted Field Size Double, Format standard, Decimal Places 3. I export this table using the docmd.transferText acExportDelim to a .txt file. when I look at the .txt file the table only show 2 decimal. My question is why and how can I get the export to put out 3 decimals.
Jan 17 '20 #1

✓ answered by NeoPa

As for exporting Text files - the options available tend to be different depending on whether or not you choose the option to Save formatted. If not, then you should get the Export Text Wizard Dialogue Box. From there you can do the basics by stepping through from one screen to the next.

There is also an Advanced... button which opens a separate wizard that allows you more control over everything. It also allows saving, as well as using previously saved, specs. In this wizard it shows your Fields in a column, but there may be more columns which are simply invisible. To see the full set simply drag the mouse across from the Field Name column to the right (beyond where the column stops) and then double-click the right-hand bar at the side of the column title. This will ensure all the other columns show in the wizard. Mostly they're irrelevant but it does allow a little more control and visibility.


9 2310
SioSio
272 256MB
The default for displaying "No. of digits after decimal" when exporting is depends on Windows settings.
Ex.)
Change Number Format in Windows 10.
Open the Control Panel in Large or Small icons view. Click on Region.
When the Region window opens, click on the Additional settings button.
The Customize Format window opens. In the Numbers tab, you can customize "No. of digits after decimal".

<Other than using the control panel shown above>
Click the [Settings] button in the text export wizard, and when the export definition dialog appears, field information will appear in the lower half.
Here, only the field name is visible, but if you double-click the right end of the item title line [| field name] many times, [| field name | data type | start position | width | index | skip ].
Change this "data type" from double-precision floating point type to text type and save. Specify this saved text export definition in a text conversion macro to get the desired format.
Jan 17 '20 #2
NeoPa
32,556 Expert Mod 16PB
When exporting, if you want the data in a specific format, export a Query instead of a Table and make sure the data is formatted text rather than Numeric where you rely on the system to format the data for you.

So, if you have a Field in your output that needs to be formatted as "#,##0.000", for instance, use :
Expand|Select|Wrap|Line Numbers
  1. Format([YourNumericField],'#,##0.000') AS [FieldName]
Jan 17 '20 #3
CD Tom
489 256MB
NeoPa
I have created a query with the format in the fields that require 3 decimals. This works on some machines but on others I get a function not available. I know this error is caused by a missing reference, here's the problem, I have one machine that has Access 365 on it I'm using Access 2007 runtime. I've opened the program with Access 365 and the program runs fine, however I've compiled the program in Access 365 but when I run the compiled program I get the Function not available error. Do you have any ideas about what causes this to happen.
Jan 17 '20 #4
CD Tom
489 256MB
Sio Sio
Changing the Windows 10 region works fine however I can't find any of the settings you are talking about in the export wizard Remember I'm running Access 2007 so what I have is on the top menu "External Data" I click on it, then click on the "Text file" in the export section. I have nothing that will let me set any of the fields. Do I even have this option in Access 2007
Jan 17 '20 #5
CD Tom
489 256MB
SioSio
Ok after playing around I was able to get the field names to appear in the Advanced screen however I can't get anything except the Field Name and no matter where I double click I get nothing.
Jan 17 '20 #6
NeoPa
32,556 Expert Mod 16PB
Hi Tom.

It's advisable always to develop your project at the lowest level (IE. The oldest version you expect it to be used on). Access will handle upgrading automatically to newer version libraries, but not the other way around.

I suspect if you do it that way around you should find it works everywhere.
Jan 17 '20 #7
NeoPa
32,556 Expert Mod 16PB
As for exporting Text files - the options available tend to be different depending on whether or not you choose the option to Save formatted. If not, then you should get the Export Text Wizard Dialogue Box. From there you can do the basics by stepping through from one screen to the next.

There is also an Advanced... button which opens a separate wizard that allows you more control over everything. It also allows saving, as well as using previously saved, specs. In this wizard it shows your Fields in a column, but there may be more columns which are simply invisible. To see the full set simply drag the mouse across from the Field Name column to the right (beyond where the column stops) and then double-click the right-hand bar at the side of the column title. This will ensure all the other columns show in the wizard. Mostly they're irrelevant but it does allow a little more control and visibility.

Attached Images
File Type: jpg Expand.Jpg (58.0 KB, 766 views)
File Type: jpg SelectCols.Jpg (46.1 KB, 786 views)
Jan 17 '20 #8
CD Tom
489 256MB
I am using Access 2007, but my problem is in the references I show "Microsoft office 16.0 Object Library" and "Microsoft Access 12.0 Object Library", "Microsoft office 16.0 Access Database engine Object"
and some others. I've looked in the non-checked references and there isn't one for Microsoft office 12.0 Object Library. I can browse and find it but when I check it, it doesn't show up in the references anywhere. No sure what to do.
Jan 17 '20 #9
CD Tom
489 256MB
Ok I just figured out how to expand those other columns that were hidden. What a pain. Thanks for all your help.
Jan 17 '20 #10

Sign in to post your reply or Sign up for a free account.

Similar topics

4
by: Teresa | last post by:
I'm trying to import a tab delimited text file. The text file does not have column heading. I can give it column heading if needed. How do I change the defult comma delimited to tab? If I...
3
by: holdemfoldem | last post by:
Hi. I'm new to this board and have a few questions about using the method referred to in the topic of this message. I have manually transferred over 1/2 million records from a text file into my...
0
by: Chris | last post by:
Hi, I am using the command below for exporting data to text file. One of the query columns has SINGLE number type with decimal ponts as auto. DoCmd.TransferText acExportDelim,...
14
PEB
by: PEB | last post by:
Hi all, Yesterday i've tried this command: DoCmd.TransferText acExportDelim, "Comma_SEP", "myquery", "D:\Temp\Temp.txt" And it gave me an Error that can't find "D:\Temp\Temp.txt" This...
1
by: amitk | last post by:
Hello, I'm using Access 2002-2003. My application exports an Access table into a text file and then appends the text file with several othet files to generate a final file XXXX.ftm . ...
0
by: Cuaracao | last post by:
This is my code: Code1: 'DoCmd.OpenTable "tblImport" 'DoCmd.TransferDatabase acExport, "dBASE IV", strOutputDir,acTable,"sel_TblImport", strDbfName & ".dbf", False ' DoCmd.Close acTable,...
10
by: sakurako97 | last post by:
hi, i am trying to find out if it is possible to pass the current recordset of a form to DoCmd.TransferText so i can export it as a .csv I know I can use querydefs etc, but it would be a much...
14
jbt007
by: jbt007 | last post by:
Hi All, System: Access 2010, WinXP I have a text file I am importing using the following code: 'Import text report into tblBVRRaw table using the BVRImp Spec... DoCmd.TransferText...
2
by: Mariostg | last post by:
I am having issues importing a space delimited file with DoCmd.TransferText. I created a specification name through File->Get External Data->Import. It all works fine when I import the file via the...
3
by: ercanu | last post by:
hi everyone: i am trying to import an csv file from internet to my database. i use these vars: myurl= "www.heresmyfile/table.csv" mypath= "C:\users\me\table.csv 'i use the API function...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.