Google Answers Logo
View Question
 
Q: MS Access 2000 macro Connecting with Excel ( Answered 5 out of 5 stars,   0 Comments )
Question  
Subject: MS Access 2000 macro Connecting with Excel
Category: Computers > Software
Asked by: sjkistler-ga
List Price: $10.00
Posted: 12 Feb 2003 07:50 PST
Expires: 14 Mar 2003 07:50 PST
Question ID: 160431
I want to write a macro (sorry, not fond of VB - am a simple person)
that runs a query and then exports the results of that query to excel.
I have:

OpenQuery (this works fine, settings are right, opens correct query)

TransferSpreadsheet (does not work, here are settings - in brackets):
   Transfer Type [Export]
   Spreadsheet Type [Microsoft Excel 8-9]
   Table Name [AddressJournalsUSA] - see note (1)
   File Name [C:\Documents and Settings\Owner\My
Documents\addresslist.xls] - see note (2)
   Has Field Names [Yes]
   Range - left blank

(1) This is the name of the QUERY opened in OpenQuery in first step
(2) the file addresslist.xls already exists. would actually prefer
that the process makes a new file if one does not exist with the
appropriate name, but not sure if that is feasible

Please advise

Request for Question Clarification by hammer-ga on 12 Feb 2003 08:30 PST
I just tried this and it worked fine. Are you getting an error message
that might give me a clue?

By the way, you don't need to do the OpenQuery action. 

- Hammer

Clarification of Question by sjkistler-ga on 12 Feb 2003 09:43 PST
My apologies - I should have been FAR more specific about the problem
- the problem is getting clarified as I play with it. This does get
the mailing list to excel - but it also crashes access in doing so.
When I wrote the question, I didn't realize that the list was making
it to excel (too distracted by my crashing access program). I should
note that I am running a relatively new computer with lots of
processing power and memory and that almost nothing else crashes it -
ever. Should also note that it does not crash or have any problems
whatsover when I do this by hand through using the pull-down menus in
access. Thanks for thinking about this with me.

Request for Question Clarification by hammer-ga on 12 Feb 2003 10:23 PST
Again, does the crash give you an error message or is the usual
"Invalid Page Fault" or "General Protection Fault" crash?  What
version of Windows do you use?

- Hammer

Clarification of Question by sjkistler-ga on 21 Feb 2003 05:38 PST
Ok, after a very long week, appears that the problem is with my
system. The query works and runs, but only after rebooting the maching
- basically, the computer must be fresh and I can't run it twice
without locking up the machine (no error message, no warning, just a
freeze). It was your answer that told me that the error was with my
system. Happy to pay you. Not sure how to do it without you indicating
that the answer is complete.
Answer  
Subject: Re: MS Access 2000 macro Connecting with Excel
Answered By: hammer-ga on 23 Feb 2003 06:33 PST
Rated:5 out of 5 stars
 
I'm glad I was able to help you troubleshoot. You may want to try
reinstalling Access. You may also want to look into any new software
you've installed lately, particularly antivirus or system monitoring
packages.

Good luck!

- Hammer
sjkistler-ga rated this answer:5 out of 5 stars

Comments  
There are no comments at this time.

Important Disclaimer: Answers and comments provided on Google Answers are general information, and are not intended to substitute for informed professional medical, psychiatric, psychological, tax, legal, investment, accounting, or other professional advice. Google does not endorse, and expressly disclaims liability for any product, manufacturer, distributor, service or service provider mentioned or any opinion expressed in answers or comments. Please read carefully the Google Answers Terms of Service.

If you feel that you have found inappropriate content, please let us know by emailing us at answers-support@google.com with the question ID listed above. Thank you.
Search Google Answers for
Google Answers  


Google Home - Answers FAQ - Terms of Service - Privacy Policy