Results 1 to 2 of 2
  1. #1
    Darkladymelz is offline Advanced Beginner
    Windows XP Access 2007
    Join Date
    Sep 2011
    Posts
    43

    Parameter Value Cancel button

    I have created a query with parameter values, which work fine.

    My database opens and closes forms via a macro button. when I click on the button to open the query with the parameter values it automatically closes the form that the button appears on (this is what I want to happen).

    My problem is, for instance, if I decided I do not want to open this query and I press 'Cancel' on the parameter value box the box closes and I am left with an empty screen. Is there a way for me to be able to press the 'Cancel' button and it re-open the form it was on before?

    Below are screenshots of the process:

    Click image for larger version. 

Name:	Untitled-3.gif 
Views:	3 
Size:	31.7 KB 
ID:	6745

    Click image for larger version. 

Name:	Untitled-4.gif 
Views:	2 
Size:	5.9 KB 
ID:	6746



    Click image for larger version. 

Name:	Untitled-5.jpg 
Views:	1 
Size:	59.9 KB 
ID:	6747

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,931
    That input popup is generated by a parameter prompt in query? I don't use query input parameter prompts just for this sort of reason. The input cannot be validated and it is not available to code for further processing. I use controls on forms for parameter input and validation. The parameter in query would refer to the control on form for input value. Then code can check if value in control and if not there, do not run report and do not close form.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Cancel Error
    By Newbie11 in forum Reports
    Replies: 1
    Last Post: 02-13-2012, 09:13 AM
  2. Replies: 13
    Last Post: 01-10-2012, 09:56 AM
  3. Cancel button for adding data
    By eliotchs in forum Forms
    Replies: 1
    Last Post: 11-21-2011, 04:46 PM
  4. Yes/No/Cancel Message Box
    By lynnmc26 in forum Access
    Replies: 0
    Last Post: 04-01-2011, 07:26 PM
  5. Yes No Cancel MsgBox
    By Rick West in forum Forms
    Replies: 5
    Last Post: 04-14-2010, 08:57 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums