PC Review


Reply
Thread Tools Rate Thread

Automating Access

 
 
gbostock@excite.com
Guest
Posts: n/a
 
      20th Jul 2007
I'm new to Access but experienced with Oracle, SQL etc.

Here's what I want to do.

Create a macro to run 4 existing queries in sequence. Each query
depends on the results of the previous one. I want to send the results
of the final query to an excel file.

I've gotten as far as creating a macro with 4 openquery actions.

When I've got the macro working properly. I want to be able to use the
scheduled tasks program to run the macro at a regular time.

Any help will be appreciated.

 
Reply With Quote
 
 
 
 
=?Utf-8?B?SHVudGVyNTc=?=
Guest
Posts: n/a
 
      20th Jul 2007
Hi,

I think you will need to use VBA to do all of that. VBA will enable you to
"trap errors" and works well with Excel.

This sounds rather complex. If you are using these Access queries to do
calculations, perhaps it would be better to export the information to Excel
and let Excel do the calculations. You have not given us enough info to help
you very much with this.

Hunter57

"(E-Mail Removed)" wrote:

> I'm new to Access but experienced with Oracle, SQL etc.
>
> Here's what I want to do.
>
> Create a macro to run 4 existing queries in sequence. Each query
> depends on the results of the previous one. I want to send the results
> of the final query to an excel file.
>
> I've gotten as far as creating a macro with 4 openquery actions.
>
> When I've got the macro working properly. I want to be able to use the
> scheduled tasks program to run the macro at a regular time.
>
> Any help will be appreciated.
>
>

 
Reply With Quote
 
Pat Hartman \(MVP\)
Guest
Posts: n/a
 
      20th Jul 2007
We need a little more information to guide you in the right direction.
Generally speaking, macros are the least desirable solution given their lack
of error trapping. If this is something for yourself, it doesn't matter but
if you are creating something for someone else, VBA is a better solution.
In versions of Access prior to A2007, there was an option on the macro menu
to convert a macro to code so if you don't know how to write the code, you
can create a macro and then convert it.

However, your solution really depends on what the queries do. If each query
makes a table or appends/updates an existing table, then running them in
series will accomplish your goal but you may not actually need to create
intermediate tables at all. Access allows you to use queries
interchangeably with tables so you can join queries to each other or to
tables. This allows you to simplify your query and build up to the final
recordset which may join or union several other queries.

<(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> I'm new to Access but experienced with Oracle, SQL etc.
>
> Here's what I want to do.
>
> Create a macro to run 4 existing queries in sequence. Each query
> depends on the results of the previous one. I want to send the results
> of the final query to an excel file.
>
> I've gotten as far as creating a macro with 4 openquery actions.
>
> When I've got the macro working properly. I want to be able to use the
> scheduled tasks program to run the macro at a regular time.
>
> Any help will be appreciated.
>



 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Automating MS Access devm01@gmail.com Microsoft Access 4 21st Apr 2006 09:44 AM
automating outlook via access =?Utf-8?B?15nXldeQ15Eg15HXqNeW15nXnNeZ?= Microsoft Access VBA Modules 8 20th Nov 2005 02:58 PM
Automating emails from Access using Outlook 97 and Access 97 =?Utf-8?B?VGltIExvbmc=?= Microsoft Outlook VBA Programming 5 16th Jun 2005 08:40 PM
Automating Access from Excel =?Utf-8?B?cXVhcnR6?= Microsoft Excel Programming 2 11th May 2005 09:36 PM
Automating Access quartz Microsoft Access Macros 1 31st Dec 2003 10:20 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 09:34 PM.