PC Review


Reply
Thread Tools Rate Thread

Cancel Button

 
 
=?Utf-8?B?V01vcnNiZXJnZXI=?=
Guest
Posts: n/a
 
      5th Sep 2006
I have a button on my form that when you press the button it asks you to
enter the date. If you press the cancel button it shuts the form down and
takes you to the database window. Is there a way that if the cancel button
is pushed that the form will remain up? Can someone please help?
 
Reply With Quote
 
 
 
 
Rick Brandt
Guest
Posts: n/a
 
      5th Sep 2006
WMorsberger wrote:
> I have a button on my form that when you press the button it asks you
> to enter the date. If you press the cancel button it shuts the form
> down and takes you to the database window. Is there a way that if
> the cancel button is pushed that the form will remain up? Can
> someone please help?


Eliminate the button's code?

Seriously, I assume you mean that "under certain conditions" you want the
Cancel button to behave differently than it normally does. What are those
conditions and what do you want it to do differently?

--
Rick Brandt, Microsoft Access MVP
Email (as appropriate) to...
RBrandt at Hunter dot com


 
Reply With Quote
 
=?Utf-8?B?V01vcnNiZXJnZXI=?=
Guest
Posts: n/a
 
      6th Sep 2006
Currently the button that I have is associated with a query. When the button
is pushed it asks you to enter a date. If someone pushes that button, then
decides that they pushed the wrong thing, when they press the cancel button
to get rid of the message the whole form shuts down and they are taken to the
database base menu. I want the user to have the option to press cancel but I
want the form to stay up.

"Rick Brandt" wrote:

> WMorsberger wrote:
> > I have a button on my form that when you press the button it asks you
> > to enter the date. If you press the cancel button it shuts the form
> > down and takes you to the database window. Is there a way that if
> > the cancel button is pushed that the form will remain up? Can
> > someone please help?

>
> Eliminate the button's code?
>
> Seriously, I assume you mean that "under certain conditions" you want the
> Cancel button to behave differently than it normally does. What are those
> conditions and what do you want it to do differently?
>
> --
> Rick Brandt, Microsoft Access MVP
> Email (as appropriate) to...
> RBrandt at Hunter dot com
>
>
>

 
Reply With Quote
 
Rick Brandt
Guest
Posts: n/a
 
      6th Sep 2006
WMorsberger wrote:
> Currently the button that I have is associated with a query. When
> the button is pushed it asks you to enter a date. If someone pushes
> that button, then decides that they pushed the wrong thing, when they
> press the cancel button to get rid of the message the whole form
> shuts down and they are taken to the database base menu. I want the
> user to have the option to press cancel but I want the form to stay
> up.


Is this a code generated InputBox or a parameter prompt from the query?

--
Rick Brandt, Microsoft Access MVP
Email (as appropriate) to...
RBrandt at Hunter dot com


 
Reply With Quote
 
=?Utf-8?B?V01vcnNiZXJnZXI=?=
Guest
Posts: n/a
 
      6th Sep 2006
It is a parameter prompt from the query

"Rick Brandt" wrote:

> WMorsberger wrote:
> > Currently the button that I have is associated with a query. When
> > the button is pushed it asks you to enter a date. If someone pushes
> > that button, then decides that they pushed the wrong thing, when they
> > press the cancel button to get rid of the message the whole form
> > shuts down and they are taken to the database base menu. I want the
> > user to have the option to press cancel but I want the form to stay
> > up.

>
> Is this a code generated InputBox or a parameter prompt from the query?
>
> --
> Rick Brandt, Microsoft Access MVP
> Email (as appropriate) to...
> RBrandt at Hunter dot com
>
>
>

 
Reply With Quote
 
Rick Brandt
Guest
Posts: n/a
 
      6th Sep 2006
WMorsberger wrote:
> It is a parameter prompt from the query


Post your code then. There is no reason why pressing cancel should cause
that unless your code is handling the query incorrectly or the query is
corrupted.

If you run the query from the db window and press cancel on the parameter
prompt what happens?

--
Rick Brandt, Microsoft Access MVP
Email (as appropriate) to...
RBrandt at Hunter dot com


 
Reply With Quote
 
=?Utf-8?B?V01vcnNiZXJnZXI=?=
Guest
Posts: n/a
 
      6th Sep 2006
I didn't write code for the button - The form is based on a query, so there
is a macro on the button that tells the button to open the new form and the
close the form that it is currently on - when you press the button you are
prompted for the date and if you cancel out of it then the other form has
already closed - I guess now after writing this I can just change the macro
to leave that form up

"Rick Brandt" wrote:

> WMorsberger wrote:
> > It is a parameter prompt from the query

>
> Post your code then. There is no reason why pressing cancel should cause
> that unless your code is handling the query incorrectly or the query is
> corrupted.
>
> If you run the query from the db window and press cancel on the parameter
> prompt what happens?
>
> --
> Rick Brandt, Microsoft Access MVP
> Email (as appropriate) to...
> RBrandt at Hunter dot com
>
>
>

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to Cancel a Cancel Button event Eric T. Microsoft Dot NET Framework Forms 3 5th Feb 2009 11:36 PM
Cancel button =?Utf-8?B?TmluaWVs?= Microsoft Access Forms 3 20th Jun 2007 04:23 AM
Cancel button to cancel the whole macro excelnut1954 Microsoft Excel Programming 5 17th Jan 2006 08:27 PM
Custom button from a Control class doesn't appear as a choice for OK/Cancel button in a Form properties CroDude Microsoft C# .NET 3 28th Jun 2005 06:27 PM
Cancel button? LL Microsoft ASP .NET 2 2nd Dec 2003 04:30 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 12:41 AM.