Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Exporting Access Table

Posted on 2004-04-27
8
Medium Priority
?
158 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 300 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

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

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

Introduction While answering a recent question (http://www.experts-exchange.com/Q_27402310.html) in the VB classic zone, I wrote some VB code in the (Office) VBA environment, rather than fire up my older PC.  I didn't post completely correct code o…
Article by: Martin
Here are a few simple, working, games that you can use as-is or as the basis for your own games. Tic-Tac-Toe This is one of the simplest of all games.   The game allows for a choice of who goes first and keeps track of the number of wins for…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
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…
Suggested Courses

636 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