Re: run queries by the batch



Rick - Thank you. Is that a common practice? I'll experiment with
that. Is that a common practice and if so, under what conditions would
one normally want to use such code?

Mike
Rick Brandt wrote:
Tonk wrote:
Sorry to pollute the post with so many dumb questions! Until I figure
out how to write queries that accomplish more than 1 thing at a time,
I was wondering if there was any way to automate queries. For
example, I have a delete query that deletes bad data. I run an
update query that changes sex from 2 to 1 if conditions x, y, and z
are met. I run another delete query that checks for missing values.
And so on, and so forth.

I guess what I'm looking for is a way to run a batch file that will
run a series of queries one right after the other.

Am I nuts or does such capability exist?

tonk

In VBA code you can have...

CurrentDB.Execute "FirstQueryName", dbFailOnError
CurrentDB.Execute "SecondQueryName", dbFailOnError
CurrentDB.Execute "ThirdQueryName", dbFailOnError
etc..


--
Rick Brandt, Microsoft Access MVP
Email (as appropriate) to...
RBrandt at Hunter dot com

.



Relevant Pages

  • Re: Invoices
    ... Sorry - you lost me. ... "Rick B" wrote: ... If the form is also used to view data, it will often be bound to a query. ... perhaps you have the "data entry" property set to ...
    (microsoft.public.access.forms)
  • Re: Form doesnt show added table information
    ... there -is- a query behind it. ... I believe Rick was probably on the right ... "KARL DEWEY" wrote: ... I checked and there are no filters. ...
    (microsoft.public.access.forms)
  • Re: Is it possible to get a report where every column is sorted the way I want i
    ... Rick B, ... for both "test scores" and "quiz scores" at the same ... a new report every time I sort by a different column if I ... wanted a hard copy of the query. ...
    (microsoft.public.access.queries)
  • Re: As a generale rule - Query or VBA?
    ... I agree with you Rick, I was recently working on a database that had ... the query is saved, then JET will save the fastest execution path. ...
    (comp.databases.ms-access)
  • Re: P.S. to decimal datatype field not sorting correctly
    ... Rick, this is in fact an unfixed bug in Access: ... Incorrect Sorting ... > function in my passthrough query. ... >>>I'm using a passthrough query to pull in SQL Server ...
    (microsoft.public.access.queries)