Need help with macro

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

Guest

Posted before but don't think i explained it well. I have a database with a
main switchboard. From the switchboard you can do various queries which are
linked to by command buttons. When you click the command button it closes the
switchboard and shows a dialogue box which asks for the criteria set up in
the query. If I click cancel at this point, the screen closes and I am left
with just the database window. I want the switchboard to open if I click the
cancel button. I know I have done it before but can't remember how.......!!!
 
If you want the switchboard available "behind" the query, don't close it.

--
Regards

Jeff Boyce
<Office/Access MVP>

Scooby said:
Posted before but don't think i explained it well. I have a database with a
main switchboard. From the switchboard you can do various queries which are
linked to by command buttons. When you click the command button it closes the
switchboard and shows a dialogue box which asks for the criteria set up in
the query. If I click cancel at this point, the screen closes and I am left
with just the database window. I want the switchboard to open if I click the
cancel button. I know I have done it before but can't remember
how.......!!!
 
....or use a VBA module instead and include something like:

dim response%
response = msgbox("Your message about running a query",vbokcancel,"Run?")
if response = vbok then
'do your query stuff here
else
'reopen your switchboard here
docmd.openform "MySwitchboard"
end if
 
Back
Top