We help IT Professionals succeed at work.
Get Started

Canceling excution of all code when end user select x at top of form

Juan Ocasio
Juan Ocasio asked
on
54 Views
Last Modified: 2020-01-17
Hello all:

I have two forms (MS Access 2010).  The main form allows an end user to select certain materials.  Once they select an item and then press 'Process', it the material has serial numbers, it displays the second form (acDialog), so the end user can select the serial numbers they're processing.  What I would like to happen is if an end user clicks the x at the top of the second form (the serial number selector), I want all execution to stop.  I thought if I create an Err object it would do that, but it throws the error and then continues execution on the main form.  Is there a way to completely stop execution of the code?

Many thanks!

Juan
Comment
Watch Question
President / Owner
CERTIFIED EXPERT
Fellow
Most Valuable Expert 2017
Commented:
This problem has been solved!
Unlock 2 Answers and 8 Comments.
See Answers
Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant

An Experts Exchange subscription includes unlimited access to online courses.

Get Started
Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

  • Troubleshooting
  • Research
  • Professional Opinions
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE