Solved

Exporting Access Table

Posted on 2004-04-27
8
155 Views
Last Modified: 2010-05-02
Hi,

I have to export an Access table or query using Visual Basic.
My options are fixed file format, comma delimitted file or excel
spreadsheet with columns.
Which one is better and faster?

Thanks
0
Comment
Question by:rod69
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
8 Comments
 
LVL 1

Expert Comment

by:EvadR
ID: 10932929
It depends on what you want to do with it once it is exported.  Fixed file format would probably be larger but easier to read (if you had to look at as a text file), comma delimited would probably be the most common and easiest to import into something else unless of course you're importing it to Excel, then Excel format would be the obvious choice.

All in all, it might not make a difference... again, it really depends on what you want to do with it.

HTH,
-EvadR
0
 

Author Comment

by:rod69
ID: 10933197
I'll need to export data for somebody else, so once I exported I'm not going to use it anymore. My question is which one is easier to programm.

0
 
LVL 1

Expert Comment

by:EvadR
ID: 10938452
In Access, goto the File menu, select Import/Export, select Table or Query to export.... no programming required.

-EvadR
0
 

Author Comment

by:rod69
ID: 10939120
I have to do it with Visual Basic that's why I', asking for help.
I need like a button in a form to do the job.
0
 
LVL 1

Accepted Solution

by:
EvadR earned 75 total points
ID: 10940999
I was afraid you were going to say that, but no worries:

0. Open a text file with append access.
1. Create a recordset with all your data.
2. Looping thru the recordset...
3. Inner loop for each field...

4A. Output to the text file the value of the field with a comma on the end.

4B. Output to the text file the value of the field, padding the value with spaces the length of the field definition.

-EvadR
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

When designing a form there are several BorderStyles to choose from, all of which can be classified as either 'Fixed' or 'Sizable' and I'd guess that 'Fixed Single' or one of the other fixed types is the most popular choice. I assume it's the most p…
Enums (shorthand for ‘enumerations’) are not often used by programmers but they can be quite valuable when they are.  What are they? An Enum is just a type of variable like a string or an Integer, but in this case one that you create that contains…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

695 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question