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, 4 7758
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
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
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
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 This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
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...
|
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...
|
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...
|
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...
|
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...
|
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...
|
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...
|
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...
|
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...
|
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...
|
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...
|
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...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
|
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...
|
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: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
| |