Re: Event Question

From: Rick B (Anonymous)
Date: 01/12/05


Date: Wed, 12 Jan 2005 15:46:20 -0600

Before the cancel you would need to pop up a message box and ask them if
they wish to abort. Then branch to the proper place in your code. Either
do the "cancel=true" line, or exit the sub.

Rick B

"Joe Williams" <joe@anywhere.com> wrote in message
news:u5OPRtO%23EHA.2608@TK2MSFTNGP10.phx.gbl...
> Thanks
>
> I did this and there is one problem - If the user is adding a record and
> then just wants to exit, now they are not able to close the form becuase
the
> close button is gone and it will not let them proceed without validating
> thier entries (meaning fields cannot be null, etc)
>
> How do I give them an "out" from the form and to not save the record?
>
> Thanks
>
> Joe
> "Paul B." <PaulB@discussions.microsoft.com> wrote in message
> news:AF2D6218-52A3-41C2-BD29-8C33024670F4@microsoft.com...
> > Consider disabling the 'X' by changing the forms Control Box property to
> > No
> > (to remove the X) or the Close Button to No (to grey out the X)
> >
> > Then your users are forced to use one of your command buttons, then
> > following Rick's suggestion, run your validation then close the form.
> >
> > "Joe Williams" wrote:
> >
> >> I have a form with two buttons: PRINT and CLOSE. The form also has the
X
> >> in
> >> teh upper right hand corner of the form.
> >>
> >> I would like to create a function that validates all of the field
> >> information prior to either one of these actions to happen.
> >>
> >> I have read a post about creating an integer value that you can set if
> >> the
> >> form's information is valid or not, but I am not sure how to use it.
> >>
> >> My question is, what do I need to do to make sure the form cannot be
> >> closed,
> >> printed, or even change records unless all the form's fields are
entered
> >> correctly?
> >>
> >> Thanks
> >>
> >> Joe
> >>
> >>
> >>
>
>