Multiple action queries

J

Jack Sheet

If I set up several action queries (append or update), is it possible to
have one "master" query that calls the other specified action queries and
run them in sequence?

Thanks
 
J

Jeff Boyce

Jack

You don't need a query to run other queries.

At the simplest level, you could create a macro that calls each of the
action queries.

If you want better control and error handling, write a procedure that calls
the action queries, then call that procedure.

--
Regards

Jeff Boyce
Microsoft Office/Access MVP


Microsoft IT Academy Program Mentor
http://microsoftitacademy.com/

Microsoft Registered Partner
https://partner.microsoft.com/
 
J

Jack Sheet

Thanks Jeff

I see the option to create a macro. What is the difference between a Macro
and a Procedure?

Jeff Boyce said:
Jack

You don't need a query to run other queries.

At the simplest level, you could create a macro that calls each of the
action queries.

If you want better control and error handling, write a procedure that
calls
the action queries, then call that procedure.

--
Regards

Jeff Boyce
Microsoft Office/Access MVP


Microsoft IT Academy Program Mentor
http://microsoftitacademy.com/

Microsoft Registered Partner
https://partner.microsoft.com/
 
G

Guest

A procedure is written in VBA. You can control error handling in a VBA
procedure. Macros are mostly for those not familiar with VBA and allow you
to specify a sequence of actions. You have to live with standard Access
error messages and are clumsy for a user to deal with.

Jack Sheet said:
Thanks Jeff

I see the option to create a macro. What is the difference between a Macro
and a Procedure?
 
J

Jack Sheet

Thanks for that. I have been writing "Macros" in VBA for Excel for quite
some time, so had not appreciated the distinction in Access.
 
G

Guest

I can certainly understand the confusion. There is a distinction between
Macros and VBA in Access that is not in Excel, Word, or any of the other
Office components. That is because it goes back to the old days when Macros
in Excel (etc) were really Macros and not VBA.

In early versions, Macros were nothing more that a string of actions based
on recorded keystrokes. You could either record them or write them by hand
using codes like: {UP} {DOWM} {END} {LEFT} etc. Then Microsoft added VBA,
but kept calling them Macros so as not to confuse users. You can still
create a Macro using recorded keystrokes, but now, rather than a series of
key codes, it writes VBA behind the scenes.
 
G

Guest

Then your experience is very limited.
A procedure (if we limit it to programming and exclude medical and legal
procedures) is any collection of code that performs a specific task.
VBA Subs and Fuctions are both procedures.
In COBOL, it is called a Paragraph.

Forms and Reports are not procedures, but they are both objects.

Webster has this definition. Note specifically 2 b

Main Entry: pro·ce·dure
Pronunciation: pr&-'sE-j&r
Function: noun
Etymology: French procédure, from Middle French, from proceder
1 a : a particular way of accomplishing something or of acting b : a step in
a procedure
2 a : a series of steps followed in a regular definite order <legal
procedure> <a surgical procedure> b : a set of instructions for a computer
that has a name by which it can be called into action
3 a : a traditional or established way of doing things
 
O

onedaywhen

Klatuu said:
your experience is very limited.

Touché <g>! Notice this is the 'getting started' group i.e. I think
you should assume everyone here has very limited experience. Your words
could be perceived as being rude: if you genuinely believe me to be
inexperienced then you are rubbing it in my face; if you suspect I am
experienced then you are being sarcastic. However, because I'm a
considerate person, I'll give you the benefit of the doubt and assume
you didn't mean your comment pejoratively. We're cool, dude ;-)
if we limit it to programming and exclude medical and legal
procedures

Yes, the context is important. I'd think nothing of a plea for
'relationship help' or announcement of a 'backend problem' if the
newsgroup in question was an Access one (beyond a small titter,
naturally).
VBA Subs and Fuctions [sic] are both procedures.

In VBA terms, 'procedure' on its own is vague. I would expect
consensus on the Sub and Function keywords pertaining to 'sub
procedure', though.

Unlike VBA, SQL has a PROCEDURE keyword and the regulars round here
don't respond well to the industry-standard term 'stored procedure'.
The ghettoised 'parameter query' doesn't translate well when the
PROCEDURE in question could contain a SQL *statement*
(INSERT/UPDATE/DELETE), rather than a query.

BTW I tend to quote SQL keywords in uppercase, at the risk of appearing
as though I am shouting. If everyone was as considerate there would be
little room for confusion over terms such as PROCEDURE.

Jamie.

--
 
G

Guest

My apologies if I offended. I certainly understand nobody was born knowing
anything and we all have our areas of knowledge as well as areas where we
lack knowledge.

Perhaps I misunderstood your post. It came accross as "This is what a
procedure is". My intent was only to point out what procedures can be. I
really meant no animosity.

onedaywhen said:
your experience is very limited.

Touché <g>! Notice this is the 'getting started' group i.e. I think
you should assume everyone here has very limited experience. Your words
could be perceived as being rude: if you genuinely believe me to be
inexperienced then you are rubbing it in my face; if you suspect I am
experienced then you are being sarcastic. However, because I'm a
considerate person, I'll give you the benefit of the doubt and assume
you didn't mean your comment pejoratively. We're cool, dude ;-)
if we limit it to programming and exclude medical and legal
procedures

Yes, the context is important. I'd think nothing of a plea for
'relationship help' or announcement of a 'backend problem' if the
newsgroup in question was an Access one (beyond a small titter,
naturally).
VBA Subs and Fuctions [sic] are both procedures.

In VBA terms, 'procedure' on its own is vague. I would expect
consensus on the Sub and Function keywords pertaining to 'sub
procedure', though.

Unlike VBA, SQL has a PROCEDURE keyword and the regulars round here
don't respond well to the industry-standard term 'stored procedure'.
The ghettoised 'parameter query' doesn't translate well when the
PROCEDURE in question could contain a SQL *statement*
(INSERT/UPDATE/DELETE), rather than a query.

BTW I tend to quote SQL keywords in uppercase, at the risk of appearing
as though I am shouting. If everyone was as considerate there would be
little room for confusion over terms such as PROCEDURE.

Jamie.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top