473,402 Members | 2,050 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,402 software developers and data experts.

Transfertext Specification Name *.ini

Hi,
I'm exporting data from MSAccess to a *.txt file using VBA. I have
already set up specification to TAB delimited, no Commas for Text and
saved it ( .. in File>Export, etc)

The problem is that current Database can be opened from different
computers. Instead of setting Specification names on each computer,
help file says that it's possible to create and *.ini file to extract
specification name directly from it.

My question is how to create this file? Which is the structure /
parameters for this file?

I've been digging around but haven't find an answer on MSAccess groups.
Regards,
LC

Nov 13 '05 #1
4 9303
Instead of using TransferText you can write directly to a text file.
This is actually more reliable that TransferText:

Sub TabDelimTxtFile()
Dim DB As DAO.Database, RS As DAO.Recordset
Dim strPath As String, i As Integer

Set DB = CurrentDb
Set RS = DB.OpenRecordset("tblToExport")
Do While Not RS.EOF
For i = 0 to RS.Fields.Count - 2
str1 = str1 & RS(i) & vbTab
Next
str1 = str1 & RS(i) & vbCrLf '--get last field -no tab
RS.MoveNext
Loop
RS.Close
strPath = Left(DB.Name, Len(DB.Name) - Len(Dir(DB.Name))
Open strPath & "TabTxt.txt" For Output As #1
Print #1, str1
Close #1

End Sub

This routine will loop through your table and write the fields with a
tab delimeter for each field and a linefeed cariage return at the end of
the row to a string var. Then you write that string var to your text
file. This text file can be opened in Excel as a tab delimited file.

Rich

*** Sent via Developersdex http://www.developersdex.com ***
Nov 13 '05 #2
Br
ca******@yahoo.com wrote:
Hi,
I'm exporting data from MSAccess to a *.txt file using VBA. I have
already set up specification to TAB delimited, no Commas for Text and
saved it ( .. in File>Export, etc)

The problem is that current Database can be opened from different
computers. Instead of setting Specification names on each computer,
help file says that it's possible to create and *.ini file to extract
specification name directly from it.

My question is how to create this file? Which is the structure /
parameters for this file?

I've been digging around but haven't find an answer on MSAccess
groups.
Regards,
LC


The specification should be saved with the database so it should be
available to all users using it???
--
regards,

Bradley

A Christian Response
http://www.pastornet.net.au/response
Nov 13 '05 #3
You can import the specification from one database to another, if for some
reason you have the specification in just one file. Use File | Get External
Data | Import, and when the wizard window opens, click the Options button to
see a checkbox for the Import/Export specifications.

--

Ken Snell
<MS ACCESS MVP>

<ca******@yahoo.com> wrote in message
news:11**********************@g43g2000cwa.googlegr oups.com...
Hi,
I'm exporting data from MSAccess to a *.txt file using VBA. I have
already set up specification to TAB delimited, no Commas for Text and
saved it ( .. in File>Export, etc)

The problem is that current Database can be opened from different
computers. Instead of setting Specification names on each computer,
help file says that it's possible to create and *.ini file to extract
specification name directly from it.

My question is how to create this file? Which is the structure /
parameters for this file?

I've been digging around but haven't find an answer on MSAccess groups.
Regards,
LC

Nov 13 '05 #4
Thks for your responses.

Where can I find a template/structure for the *.ini file?

Regards,
LC

Nov 13 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Sue | last post by:
Using WindowsXP and AccessXP in 2000 Mode When I run the following code, I get error 3027 "Cannot Update. Database or object is read only." StrFolder = "C:\Comic Box\WebStore Interface...
2
by: BigData | last post by:
I am attempting to create a delimited text file by using DoCmd.Transfertext as shown here. DoCmd.TransferText acExportDelim, "ExportSpec", "QryFinalExport", "Fileout.txt" This works fine as...
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: Jack Doman | last post by:
Does anyone know how I can use Access XP's TransferText method to import a tab delimited text file? It works fine for comma delimited files. *** Sent via Developersdex...
3
by: Oliver Gabriel | last post by:
Hi, i want to export a table for later import, using vba. That´s my code: export: filename = "C:\HVOtabelle.txt"
6
by: Tim Marshall | last post by:
IN trying to export a Jet query (an actual saved Jet querydef which is written against a pass through query - not that that should be a problem) to text via either the File->Export... menu item or...
0
by: Sean Howard | last post by:
I have a strange problem linking tab delimited text files in Access 2000 (I am running Windows XP), please try this and let me know if I am going mad. Step 1. Create the tab-delimited text...
4
by: WillMiller | last post by:
Hi, I'm currently attempting to write a small Access Database which carries out the following tasks : 1. Imports Submission files (of a text variety) to a table using TransferText on a daily...
0
by: stuart | last post by:
I seem to have a problem with the use of the TransferText function. In 2 applications that I have, every few months, it seems to not export a few records from a table. In another application,...
3
by: Greg Strong | last post by:
Hello All, Why does Access (2003) create indexes on importing a CSV file to a table when using the TransferText Method in VB when the specification name does NOT have any indexes indicated? ...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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
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
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.