Cancel button on query pop-up

R

Rob

This probably seems like a stupid and trivial question,
but ...

Whenever the user in the database program I am developing
clicks on the 'Cancel' button on a pop-up window, I always
get an error window stating that a form can't be found.
This occurs because the Macro that calls the query
continues to run, but is without the necessary
information. Is there anyway I can make the 'Cancel'
button on the pop-up behave differently, like returning to
the Main Menu or something like that?

Thanks in advance for your help ...

Rob
 
M

[MVP] S. Clark

**Although the name of this newsgroup is 'Queries',
it is actually referring to the Access Database Query Object.**

Feel free to visit the Macros or Formscoding groups for your Macro and Form
developement needs.

You haven't explained enough about your app to give a solid answer. You
would need to specify more information about the nature of the "Pop-up" and
it's desired behavior.

The answer might be simple to solve within the Macro Actions, but you may
find that it is easy to implement in VBA as well.

--
HTH,

Steve Clark, Access MVP
FMS, Inc.
Professional Solutions Group
http://www.FMSInc.com
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Is your Access database too slow?
Are you ready to upgrade to SQL Server?
Contact us for optimization and/or upsizing!
http://www.FMSInc.com/consulting
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
 
R

Rob

Yes, I do realize that this newsgroup is about the Query
object present in Microsoft Access ... and that is what my
question is about.

I have a hidden form that has a few text boxes whose data
comes from the result of running a query. When the form
is opened, the Query automatically runs and the user is
prompted for input. Thus, the pop-up window is purely the
product of that query, and not of a form or macro I have
created or written. My problem is not when the person
clicks OK, but when they click Cancel. How can I control
what happens when somone clicks a button on a pop-up that
I did not create, but simply is a tool of the Query?

I hope this clarifies my predicament a little more, and
justifies my posting in this newsgroup ...

Rob
 
J

John Spencer (MVP)

If by Pop-up, you mean a query parameter window then there is not much you can do.

If you were using VBA, you could probably test something to see if the query had
run or trap for the error that is generated.
 

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