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.
|