User input to continue running the macro

F

FredL

So I'm using the Macro Objects to run a series of queries. However, I would
like one of the queries to open in Design form so that the user can add some
filtering before running that query and the rest of the succeeding queries.

I know I can have it open the query in design form, but how do I stop the
macro from running (so that it doesn't run the following queries), then
continue running once the user has edited the query and saved it?

I've tried using Close, but it just opens and closes it without giving the
user the ability or time to edit the query.

Thanks,
Fred
 
S

Steve Schapel

Fred,

This does not really sound like a workable approach. It is normally not
a good idea to allow users access to a query, either in design view or
datasheet view. But especially in the circumstances you described.

Can you give us a specific example to illustrate the purposae of this
query editing process? There is almost certainly a better way.
 
G

ggerke

Fred,
I am no expert, but I would try by using Stopallmacros and then initiate a
new macro on the AFterUpdate property.
 
F

FredL

I'll certainly try that route.

Steve,

The database will be used by one person only who is familiar enough with
Access. This is actually a tool that will help calculate the median based on
a population; however, the population is only a subset of a table. Therefore
the user has to put the appropriate filters that are needed to select the
population.

So it goes this way:
- Master table with all data
- Set the filter, then group/summarize the data onto Table 2
- Run the macro that will calculate medians and other metrics
- Table 2 is updated with median information as well as updates table 3
which is a summary of the metrics (No. of transactions, $ amount etc).

I'm open to other ways of doing this to simplify use for the user.

Thanks,
Fred
 
S

Steve Schapel

Fred,

Without knowing the specifics of what you mean by "filters", it would
probably be better (and more standard practice) to provide a form with
some unbound controls where the user can enter in the Criteria for the
query. And then the query itself will reference these controls, using
syntax such as:
[Forms]![NameOfForm]![NameOfTextbox]
rather than the actual criteria value being specified by the user in the
query.
 

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

Similar Threads


Top