I have an append query that I want to run several times

S

SnowWhite

I have an append query that I want to run until there are not more records to
append. Any idea how can I write a procedure or a macro.
I used the RunMacro command but the exprression is not correct; please help
me.
this is the expression in the RunMacro command, DCount("*","Ste2-Append
Weeks in Capacity Data")=0.
Ste2-Append Weeks in Capacity Data this is the name of my append query.
Thanks a lot
 
J

Jeff Boyce

In Access, it all starts with the data.

If you'll describe your data (both the data structure you want to append to
and what you are appending from) a bit more specifically, folks here may be
able to offer a bit more specific suggestions.

For instance, what is it about your data that prevents it from ALL being
appended at once...?

Regards

Jeff Boyce
Microsoft Office/Access MVP
 
S

SnowWhite

Thanks for your reply Jeff.
I have a table with job numbers, start date and stop date; I calculated the
average working time per week so my append query does the calculation and
appends the records with a new week ending attached to every job; this append
action needs to contiue until all the records are appended. If I click like
10 times my query, all the week endings by job numbers are in my table; so I
want to create a macro or function that will append all the records
automatically until there are not more records to append. I hope this help to
clarify my dilemma.
Thanks a lot Jeff
 
S

SnowWhite

I forgot to clarify I cannot append all records at once because everytime it
runs create a new weekending by job by comparing if the last weekending from
the table is equal to the job stop date.becasue all jobs have different stop
dates and different start dates then my query calcculates where it needs to
insert more records. Once again thanks for any help on this matter.
 
J

Jeff Boyce

It might help folks get a "bigger picture" if you provide some example
data...

Regards

Jeff Boyce
Microsoft Office/Access MVP
 

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