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 biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Access Form VBA acSaveNo doesnt work

Status
Not open for further replies.

haytatreides

IS-IT--Management
Oct 14, 2003
94
US
I built an exit button in my form that will prompt the user to save and exit, exit without save, or cancel exit. the exit and save and cancel exit work fine. But the exit without save doesnt work. It's an access 2002 project connected to SQL Server.
I am using the .Close event with acSaveNo (acSavePrompt doesn't work either). Does anyone know why?

Hayt
<Access - The bane of my existence>
 
Hi!

The docmd.close save options works for design changes in the form.

I'm assuming a form bound to the SQL-data

You might consider first checking whether some changes are made (dirty), then when cancel... undo

if me.dirty then
if &quot;your exit without saving value&quot; then
me.undo

Note - this will only be effective for the current record cause Access saves current record automaticly when closing, moving between records etc.

HTH Roy-Vidar
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top