Condition required for cancelled Query in a macro

C

Colin G eastwood

Hi There
I am running a Macro from within a Form, the Macro opens a
Parameter-query', if a user selects cancel from the query's input
pop-up-box, is there a condition being met, that I could make my Macro
recognise, to bring the 'StopAllMacros' command into play.
Kind regards
Colin G Eastwood
--
 
S

Steve Schapel

Colin,

As far as I know, you can't do this in a macro. Instead of a Parameter
Query, use a simple unbound form with a textbox where the user can enter
the required data, and then in the Criteria of the query, replace the
parameter prompt with a reference to the textbox, using syntax such as...
[Forms]![NameOfForm]![NameOfTextbox]
That way, you can assign your macro on a Command Button on this form,
and also a Cancel button on the form which simpy closes the form when
clicked.
 
C

Colin G eastwood

Steve Schapel said:
Colin,

As far as I know, you can't do this in a macro. Instead of a Parameter
Query, use a simple unbound form with a textbox where the user can
enter the required data, and then in the Criteria of the query, replace
the parameter prompt with a reference to the textbox, using syntax such
as...
[Forms]![NameOfForm]![NameOfTextbox]
That way, you can assign your macro on a Command Button on this form,
and also a Cancel button on the form which simpy closes the form when
clicked.
Thanks Steve
That works fine.
Kind regards
Colin G Eastwood
--
 

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