Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Microsoft Office > Access and Access VBA > Access VBA
|
Access VBA Discuss using VBA for Access programming.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Access VBA section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old March 30th, 2004, 12:59 PM
Friend of Wrox
 
Join Date: Sep 2003
Posts: 451
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to Ben Horne
Default Save Records Before Closing Form

Hi all,

Is there any way to detect record updates inside a form and fire off a message when a user closes the form that there are unsaved records? I would like to have a function inside my Music Inventory 2001 Access application that detects any unsaved records and asks the user if they want to save the changed records before the form is closed.

Here are my requirements:

  • The message should show up only when the user is about to close a form and there are unsaved record changes
  • The function should be able to detect how many unsaved records a form has

Thanks in advance,

Ben Horne
Madison Area Technical College student
-------------------------
http://community.webshots.com/user/valerian114

Go there. I have a lot of awesome photos that I rendered myself

"A Person Who Claims To Be A Flash Junkie Isn't Really A Flash Junkie Unless He Can Prove It"
__________________
Ben Horne
-------------------------
I don\'t want to sound like I haven\'t made any mistakes. I\'m confident I have.

Most likely using FireFox and concocting my next Macromedia Flash project
Snibworks Forums Moderator

Welcome to the New Age
 
Old March 30th, 2004, 11:47 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 308
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Unless you're using unbound forms, the records will save automatically, so there's no need to prompt the user.

However, if you really want to do some coding, you could always use the
Code:
Me.Dirty
property

I am a loud man with a very large hat. This means I am in charge





Similar Threads
Thread Thread Starter Forum Replies Last Post
Can't See/Edit GUI After Save and Closing Project? highflight1985 General .NET 2 January 25th, 2007 05:33 PM
How to refresh owner form on closing of child form akumarp2p C# 2005 0 December 22nd, 2006 10:27 AM
Open & save 1 frm witout closing the prvs frm anukagni Access 3 January 10th, 2006 02:42 AM
Closing a form after opening another form rosebushr Access 2 January 7th, 2006 04:34 AM
closing Form kobystud C# 4 July 1st, 2004 03:34 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.