Using RunMacro to append query until empty?

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Can this be done.
I have made a simple radio station ad scheduling system but it takes forever
because I need to repeat the append qry the max potential number of times to
make sure evry add is scheduled. I need to make this simpler by stopping the
append process when empty otherwise it appends up to 480times and as you can
imagine that takes a long time.
The RunMacro macro has an area for an argument to stop the macro when it
becomes true. The only problem is that you are only allowed to refer to
forms or reports in this section.

Is there another way - Im sure you could do it in vba but i have not clue
about vba.

Please help
 
NonVBATwit

First of all, why does 480 Append Queries take a long time? I would
imagine a couple of seconds total? Append queries are very quick,
unless they involve a lot of complex calculation or Domain Aggregate
Functions.

Anyway, I can't really imagine what you are doing. What does "when
empty" mean? Are you appending a record corresponding in some way to
all records in an existing tale or query? Why do these records have to
be appended one by one? Why can't they all be appended at once with a
single execution of one append query? Maybe you could post back with
full details of the data you are working with, and the purpose you are
trying to achieve.
 
My append query’s take a long time to run because I am comparing them to the
line before them to ensure that the same announcers voice is not used for and
ad back to back(each voice has a auto number assigned to it to make it
unique), and I am filtering out any businesses with the same business
category from being scheduled in the same ad break(same deal with the
businesses though they can have multiple business categories, such as
furniture, computers, & electrical for Harvey Norman. At the same time I
have allowed the user to set a rotation % (a number from 0-100)for each spot
that need to be compared to the other spots for that client and scheduled
accordingly.

I found a post explaining how to do a Dcount(“*â€,â€qry nameâ€) and put that
value in the RaunMacro Repeat count argument. This solved most of my answers.

That method has cut the append time down to 10minutes and from what I
understand that is probably an acceptable time span. However if you have an
suggestions for how I can do the above calculations and append them all at
once that would be great.
 
Back
Top