Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

how do you close a form from a cancel button?

Status
Not open for further replies.

christheprogrammer

Programmer
Jul 10, 2000
258
0
0
CA
I have tried 'Unload Me' but I get an 'ActiveX could't create object' error (number 429).&nbsp;&nbsp;My cancel button will not work arrrrggg!!&nbsp;&nbsp;I also tried using End but to no avail.&nbsp;&nbsp;Help please if you know!!<br>Thanks a bunch<br><br>Chris
 
Use this line of code:<br><br>DoCmd.Close acForm, Me.Name<br><br>Note that this not cancel any entry, it only closes the currently active form.<br><br>HTH<br>RDH <p>Ricky Hicks<br><a href=mailto: rdhicks@mindspring.com> rdhicks@mindspring.com</a><br><a href= > </a><br>
 
I always use this for my cancel buttons.<br><br>Me.Undo<br>DoCmd.Close<br><br>Oxycutor
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top