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

How to export a table to a text file using different export specifications

I need to export 2 tables to the same text file.
The 2 tables must be exported using different export specifications to the same text file --> the file must be cumulative.
Can I do this in Access??? If yes, advise how to do it.
Apr 25 '10 #1
4 1899
ADezii
8,834 Expert 8TB
@rachapinky
I don't think that you can do this, but what you can do is to Export the 2 Tables separately with their own Export Specs, then concatenate them into what the Original File Name should be, namely:
  1. Export Table1 as Table1.txt
  2. Export Table2 as Table2.txt
  3. Concatenate both Text Files into a Single File
  4. Assuming that you are executing this Line of Code from the same Folder where both Files exist:
    Expand|Select|Wrap|Line Numbers
    1. Copy Table1.txt + Table2.txt Table3.txt
  5. The contents of Table2.txt will be added to the contents of Table1.txt and can be viewed in Table3.txt
Apr 25 '10 #2
@ADezii
thank you very much for your answer.
can this concatenation be done using a query or a module in access???
Apr 26 '10 #3
ADezii
8,834 Expert 8TB
@rachapinky
This can be done in VBA code immediately after the Exports of the 2 Reports, but I am going out for the evening. Will show you how it is done tomorrow,
Apr 26 '10 #4
ADezii
8,834 Expert 8TB
Let's assume that both Reports were Exported to the C:\Reports\ Folder as 1.txt and 2.txt consecutively. To concatenate the results of both Reports to a single File named 3.txt, in the same Folder:
Expand|Select|Wrap|Line Numbers
  1. Dim retVal
  2.  
  3. retVal = Shell("cmd /c Copy C:\Reports\1.txt + C:\Reports\2.txt C:\Reports\3.txt", vbMinimizedNoFocus)
Apr 27 '10 #5

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

Similar topics

4
by: Jay | last post by:
This is a strange one that I can't seem to find a fix for. We have a Billing DB application (Access 2000 format) where we upload billing info in a comma delimited text file to our printer who...
8
by: stoppal | last post by:
I have a sql statement: "SELECT Field1,field2 FROM table WHERE field1="!" I need to export this to a CSV file with header information. How can I do this? I've tried the below function...
14
by: bonehead | last post by:
Greetings, I'm using the DoCmd.TransferText method to export the results of a MS Access query to a csv file. The csv will then be used to load an Oracle table. In other systems such as TOAD...
117
by: phil-news-nospam | last post by:
Is there really any advantage to using DIV elements with float style properies, vs. the old method of TABLE and TR and TD? I'm finding that by using DIV, it still involves the same number of...
3
by: Daniel Wetzler | last post by:
Dear MSSQL- experts, I have a strange problem with SQLSERVER 2000. I tried to export a table of about 40000 lines into a text file using the Enterprise manager export assitant. I was astonished...
7
by: Vanessa | last post by:
hi Everyone, I have two questions on exporting data to Excel using ASP (w/o converting formatted excel file into web page and then plug in the dynamic data): 1. Can we export data into...
1
by: smaczylo | last post by:
Hello, I've recently been asked to work with Microsoft Access, and while I feel quite comfortable with Excel, I'm at a complete loss with databases. If someone could help me with this issue I'm...
9
by: NEWSGROUPS | last post by:
I have data in a table in an Access 2000 database that needs to be exported to a formatted text file. For instance, the first field is an account number that is formatted in the table as text and...
5
by: situ | last post by:
Hi, I have Db2 ver 9.5 for LUW , running on two different system, one is linux and other on windows and have the table with same defination on both the system. i exported blob column of the...
17
by: chadh | last post by:
Hello, I'm having some troubles exporting a query to a csv file. I am able to use the doCMD.TransferText to output the query to the csv file, however, I cannot get it to use the Export...
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...
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
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
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...
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.