Closing A Form By Click Event

  • Thread starter Thread starter Mehran Ziadloo
  • Start date Start date
M

Mehran Ziadloo

Hi
How can I close the current form through clicking a button?
 
If the button is on the form, then in the button's OnClick event

DoCmd.Close ,,acSaveNo

You can stop after the word Close, the rest keeps you from being prompted to
save changes to the form, if you made any. It will automatically discard any
changes if you use acSaveNo.
 
ps. Those are design changes, changes to the record will still be saved.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top