473,387 Members | 1,535 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

how to get rid of the prompt for saving changes

ARC
Hello all,

I didn't use to have this problem in Access 97, but in 2007 (and maybe other
versions of access after 97), if you have a form that has a subform, and you
click the close button, you always get the following dialog:

"Save changes to the following objects?"

I tried putting a saverecord command prior to the close, but that had no
affect. I have found a work around, but maybe I am making this too
difficult?

What I do is to put code on the close button that reassigns the sourceobject
of any subforms to a blank form, such as:

me!subParts.sourceobject = "subBlank" 'subBlank is my form that is
totally blank, free of code and controls, etc.
docmd.close acForm, "fParts", acSaveNo

The above 2 lines is the only way I've found to prevent the Access prompt
from popping up.

Is there an easier way? It's kind of a pain to do this, and if the user
clicks the 'X' to close, they'll still get the save prompt.

Many Thanks,
Jul 23 '07 #1
4 7754
On Mon, 23 Jul 2007 16:56:10 GMT, "ARC" <an**@andyc.comwrote:
>Hello all,

I didn't use to have this problem in Access 97, but in 2007 (and maybe other
versions of access after 97), if you have a form that has a subform, and you
click the close button, you always get the following dialog:

"Save changes to the following objects?"
The only time you'd get this prompt would be if you make Design changes to your objects. I'm not sure why setting your
..SourceObject to a blank object would stop this message, however. Review your code and make sure you're not making
design changes in code.
>
I tried putting a saverecord command prior to the close, but that had no
affect. I have found a work around, but maybe I am making this too
difficult?

What I do is to put code on the close button that reassigns the sourceobject
of any subforms to a blank form, such as:

me!subParts.sourceobject = "subBlank" 'subBlank is my form that is
totally blank, free of code and controls, etc.
docmd.close acForm, "fParts", acSaveNo

The above 2 lines is the only way I've found to prevent the Access prompt
from popping up.

Is there an easier way? It's kind of a pain to do this, and if the user
clicks the 'X' to close, they'll still get the save prompt.

Many Thanks,
Scott McDaniel
scott@takemeout_infotrakker.com
www.infotrakker.com
Jul 24 '07 #2
ARC
Hmmm...

The only thing I could find is that I'm running a function when a form is
opened that resets the date format for any date fields (this is to
accomodate the differing date formats especially in the UK and Australia).
Also, this same function will hide fields where they have selected not to
use a particular feature, etc.

I got the idea to use a blank subform on close, because it would prompt to
save the form object, and all subform objects on close. So if I set the
sourceobject of the subforms to a blank form, then close with a AcSaveNo
command, I don't get the popup.

Again, I never had this problem in Access 97.

Speaking of date fields... I wonder if it's still necessary in Acc2007 for
me to have the code for date fields to cover different country settings? For
example, if the user was in Australia, they would set their date setting in
a setup screen to : "dd-mmm-yyyy", so in code, I would set the .format of a
control to "dd-mmm-yyyy", etc., on the forms's onOpen event.

Many thanks for the reply, Scott.

Andy
"Scott McDaniel" <scott@NoSpam_Infotrakker.comwrote in message
news:hq********************************@4ax.com...
On Mon, 23 Jul 2007 16:56:10 GMT, "ARC" <an**@andyc.comwrote:
>>Hello all,

I didn't use to have this problem in Access 97, but in 2007 (and maybe
other
versions of access after 97), if you have a form that has a subform, and
you
click the close button, you always get the following dialog:

"Save changes to the following objects?"

The only time you'd get this prompt would be if you make Design changes to
your objects. I'm not sure why setting your
.SourceObject to a blank object would stop this message, however. Review
your code and make sure you're not making
design changes in code.
>>
I tried putting a saverecord command prior to the close, but that had no
affect. I have found a work around, but maybe I am making this too
difficult?

What I do is to put code on the close button that reassigns the
sourceobject
of any subforms to a blank form, such as:

me!subParts.sourceobject = "subBlank" 'subBlank is my form that is
totally blank, free of code and controls, etc.
docmd.close acForm, "fParts", acSaveNo

The above 2 lines is the only way I've found to prevent the Access prompt
from popping up.

Is there an easier way? It's kind of a pain to do this, and if the user
clicks the 'X' to close, they'll still get the save prompt.

Many Thanks,

Scott McDaniel
scott@takemeout_infotrakker.com
www.infotrakker.com

Jul 24 '07 #3
ARC
I just tested and commented out my code for the dates, etc., and it still
comes up. On the subform, I'm setting the .columnhidden property of certain
fields based on setup options as well, so that is probably triggering the
save prompt. I guess I'm stuck, as I have to have the setup options work
when a form opens.
"ARC" <an**@andyc.comwrote in message
news:PI*****************@newssvr13.news.prodigy.ne t...
Hmmm...

The only thing I could find is that I'm running a function when a form is
opened that resets the date format for any date fields (this is to
accomodate the differing date formats especially in the UK and Australia).
Also, this same function will hide fields where they have selected not to
use a particular feature, etc.

I got the idea to use a blank subform on close, because it would prompt to
save the form object, and all subform objects on close. So if I set the
sourceobject of the subforms to a blank form, then close with a AcSaveNo
command, I don't get the popup.

Again, I never had this problem in Access 97.

Speaking of date fields... I wonder if it's still necessary in Acc2007 for
me to have the code for date fields to cover different country settings?
For example, if the user was in Australia, they would set their date
setting in a setup screen to : "dd-mmm-yyyy", so in code, I would set the
.format of a control to "dd-mmm-yyyy", etc., on the forms's onOpen event.

Many thanks for the reply, Scott.

Andy
"Scott McDaniel" <scott@NoSpam_Infotrakker.comwrote in message
news:hq********************************@4ax.com...
>On Mon, 23 Jul 2007 16:56:10 GMT, "ARC" <an**@andyc.comwrote:
>>>Hello all,

I didn't use to have this problem in Access 97, but in 2007 (and maybe
other
versions of access after 97), if you have a form that has a subform, and
you
click the close button, you always get the following dialog:

"Save changes to the following objects?"

The only time you'd get this prompt would be if you make Design changes
to your objects. I'm not sure why setting your
.SourceObject to a blank object would stop this message, however. Review
your code and make sure you're not making
design changes in code.
>>>
I tried putting a saverecord command prior to the close, but that had no
affect. I have found a work around, but maybe I am making this too
difficult?

What I do is to put code on the close button that reassigns the
sourceobject
of any subforms to a blank form, such as:

me!subParts.sourceobject = "subBlank" 'subBlank is my form that is
totally blank, free of code and controls, etc.
docmd.close acForm, "fParts", acSaveNo

The above 2 lines is the only way I've found to prevent the Access prompt
from popping up.

Is there an easier way? It's kind of a pain to do this, and if the user
clicks the 'X' to close, they'll still get the save prompt.

Many Thanks,

Scott McDaniel
scott@takemeout_infotrakker.com
www.infotrakker.com


Jul 24 '07 #4
On Tue, 24 Jul 2007 17:39:41 GMT, "ARC" <an**@andyc.comwrote:
>I just tested and commented out my code for the dates, etc., and it still
comes up. On the subform, I'm setting the .columnhidden property of certain
fields based on setup options as well, so that is probably triggering the
save prompt. I guess I'm stuck, as I have to have the setup options work
when a form opens.
I use .ColumnHidden in some of my 2000+ stuff, and don't get the prompt to save changes.

Wonder if importing to a new, blank database would sovle the issue ... it's worth a try, and anytime I convert one I
always do that for good measure.
>

"ARC" <an**@andyc.comwrote in message
news:PI*****************@newssvr13.news.prodigy.n et...
>Hmmm...

The only thing I could find is that I'm running a function when a form is
opened that resets the date format for any date fields (this is to
accomodate the differing date formats especially in the UK and Australia).
Also, this same function will hide fields where they have selected not to
use a particular feature, etc.

I got the idea to use a blank subform on close, because it would prompt to
save the form object, and all subform objects on close. So if I set the
sourceobject of the subforms to a blank form, then close with a AcSaveNo
command, I don't get the popup.

Again, I never had this problem in Access 97.

Speaking of date fields... I wonder if it's still necessary in Acc2007 for
me to have the code for date fields to cover different country settings?
For example, if the user was in Australia, they would set their date
setting in a setup screen to : "dd-mmm-yyyy", so in code, I would set the
.format of a control to "dd-mmm-yyyy", etc., on the forms's onOpen event.

Many thanks for the reply, Scott.

Andy
"Scott McDaniel" <scott@NoSpam_Infotrakker.comwrote in message
news:hq********************************@4ax.com.. .
>>On Mon, 23 Jul 2007 16:56:10 GMT, "ARC" <an**@andyc.comwrote:

Hello all,

I didn't use to have this problem in Access 97, but in 2007 (and maybe
other
versions of access after 97), if you have a form that has a subform, and
you
click the close button, you always get the following dialog:

"Save changes to the following objects?"

The only time you'd get this prompt would be if you make Design changes
to your objects. I'm not sure why setting your
.SourceObject to a blank object would stop this message, however. Review
your code and make sure you're not making
design changes in code.
I tried putting a saverecord command prior to the close, but that had no
affect. I have found a work around, but maybe I am making this too
difficult?

What I do is to put code on the close button that reassigns the
sourceobject
of any subforms to a blank form, such as:

me!subParts.sourceobject = "subBlank" 'subBlank is my form that is
totally blank, free of code and controls, etc.
docmd.close acForm, "fParts", acSaveNo

The above 2 lines is the only way I've found to prevent the Access prompt
from popping up.

Is there an easier way? It's kind of a pain to do this, and if the user
clicks the 'X' to close, they'll still get the save prompt.

Many Thanks,
Scott McDaniel
scott@takemeout_infotrakker.com
www.infotrakker.com

Scott McDaniel
scott@takemeout_infotrakker.com
www.infotrakker.com
Jul 24 '07 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: Gord | last post by:
Hello, If you set the flag for an overwrite prompt using the 'Save' common dialog, how do you read the response when the user clicks the Yes or No in the 'overwrite' message box? Everything...
1
by: rufus | last post by:
Hi, In an ASP.NET application I have tried using javascript to prompt a user to save their changes if they try and navigate away without saving their changes. The problem is that this...
7
by: Petesman | last post by:
I am trying to make a prompt that will ask the user for some input... If I just use var input = prompt("dafa") everything works fine but the box is put in the top left corner of the window. I need...
2
by: icedgar | last post by:
am using the following script in the BeforeUpdate area of a main form. Private Sub Form_BeforeUpdate(Cancel As Integer) Dim strMsg As String strMsg = "Do you wish to save your changes?" If...
2
by: manning_news | last post by:
Has anyone had a problem with Access 2003 not saving their coding? I've been using 2003 for a couple of months now and just this week noticed that some coding I'd done for a database was not there...
2
by: msuk | last post by:
All, I am trying to use Regasm from the command prompt and have to keep putting the full file path of where my assembley is located. Does anyone know how to set it up so wherever I run the...
0
by: tafs7 | last post by:
Hello, I have a custom datagrid control that works great. But I was thinking about adding some functionality to it. Currently, I use the datagrid to display one record at a time, and with item...
1
by: Allie | last post by:
Hi, all. This might be a silly question... but I am very new to programming in SQL so please bear with me :) So. I'm using MS SQL Server 2005 Management Studio Express. I have a table that...
27
by: RobG | last post by:
I was investigating a function to determine whether daylight saving was being observed on a particular date (given the platform's regional settings) and came across a suggestion at merlyn.com to...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.