Auto-run queries

  • Thread starter Thread starter sd
  • Start date Start date
S

sd

I need to semi-automate the following steps but I don't
know how. Can someone offer some suggestions.
First run a query that will append all the data in
tblCombined to tblAllCombined. Then delete that data from
tblCombined. Then run a new append to tblCombined using
qryCombineRecords with an input parameter for field
DateAdded. Then update tblAssembly using qryUpdateAssembly
(based on tblCombined). Clear as mud? I appreciate the
help.
 
Why? As in "why do you need to move data around from table to table?"

Since I don't understand your situation (yes, mud is a good image), here's
another I've seen that involves moving data around -- see if it offers any
parallels:

....have a table that holds the current year's data, and another that holds
"old", previous year data. Once the current year is over, move the data out
of tblCurrentYear and into tbl2004Data.

The problems with this approach is that there are now two places to look for
info, and two tables with identical structure, and, from a relational design
point of view, we're embedding data in the table name, rather than the
table.

The solution in the above case is to include a field that indicates the year
(or better still, the date) of each row, in a single table. Then, use a
query to find "old" data from previous years.

Another situation arises for "inactive" or "archived" data rows. Instead of
moving them, add a field that holds the date the row was set "inactive".
Now one query can find all rows, and another can find only the "active"
ones.

Or have I totally misunderstood your situation?
 
The reason is that I have a table of child records that I
need to concatenate together for presentation purposes and
if I run this concatenation query every time I need to
view the composite picture, it runs very slow. Whereas, if
I put the merged string into the parent table, it flies. I
am using the module from Microsoft Knowledge Base Article
322813 . If you have any suggestions for ways to increase
the performance of my concatenation query, I appreciate
it.
 
One way to speed up queries is to ensure that the fields that are used to
join and as selection criteria are all indexed in the underlying tables.
Another trick that sometimes helps is to not try to do all the joins (if
there are multiple) in a single query -- create a simple, fast query first,
then use that query as a source in a second, ... etc.

Another tip if you are using data stored apart from the front-end (in a
different .mdb, or in SQL Server, or ...) is to leave out any functions that
are Access-only in a "first" query, then add a second that uses the first as
a source, ...etc.

Don't know if you've already tried these ...
 
Back
Top