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.sou rceobject = "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 7815
On Mon, 23 Jul 2007 16:56:10 GMT, "ARC" <an**@andyc.com wrote:
>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.so urceobject = "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.co m 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_I nfotrakker.comw rote in message
news:hq******** *************** *********@4ax.c om...
On Mon, 23 Jul 2007 16:56:10 GMT, "ARC" <an**@andyc.com wrote:
>>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 sourceobjec t of any subforms to a blank form, such as:
me!subParts.s ourceobject = "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.co m 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.com wrote in message
news:PI******** *********@newss vr13.news.prodi gy.net...
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_I nfotrakker.comw rote in message
news:hq******** *************** *********@4ax.c om...
>On Mon, 23 Jul 2007 16:56:10 GMT, "ARC" <an**@andyc.com wrote:
>>>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 .SourceObjec t 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 sourceobje ct 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.clos e 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.co m www.infotrakker.com
On Tue, 24 Jul 2007 17:39:41 GMT, "ARC" <an**@andyc.com wrote:
>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.com wrote in message news:PI******* **********@news svr13.news.prod igy.net...
>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_I nfotrakker.comw rote in message news:hq******* *************** **********@4ax. com...
>>On Mon, 23 Jul 2007 16:56:10 GMT, "ARC" <an**@andyc.com wrote:
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 .SourceObje ct 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 sourceobjec t 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.clo se 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.co m www.infotrakker.com
Scott McDaniel scott@takemeout _infotrakker.co m 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 I've read explains about setting the flag to bring up the
overwrite prompt message box, but there's no explanation on how to read the
response to it. It appears that clicking the Yes option doesn't actually
overwrite the old file, so I assume I'm...
|
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 client-side solution is not reliable under
different browser-sets. Does anyone know of a robust server-side solution to
this problem? Or can anyone at least point me in the right direction because
I am having great difficulty with it.
Thanks in advance.
|
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 it to be
centered so... I was doing some research on the net (never really used
much JavaScript before) and was reading the only way to do this is by
making your own custom prompt. In my attempts of doing so I came up
with this code below. The...
|
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 MsgBox(strMsg, vbQuestion + vbYesNo, "Save Record?") = vbYes
Then
'do nothing
Else
|
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 anymore.
I reentered it and didn't have any problems for a couple of days.
Today I entered some coding, saved it, opened another database, and
when I opened my original database again, the coding I had entered was
missing.
Access 2000 always...
| |
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 command prompt from I can use Regasm saving
entering the full path.
Thanks
Msuk
|
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 templates, if you click
the edit button, the datagrid becomes a nice form to make changes.
Kinda like a big rolodex, and as you page you flip thru each record
individually.
My question is this: how can I have some kind of server side script
|
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 was created via an existing .sql file. Included were a
bunch of stored procedures. I went in to re-format these procedures.
(They were written in haste by another programmer. It is my task to go
back and improve their readabilities.) However, I am...
|
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 test the time
zone offset on a variety of dates to see if it changes. Based on
that, I developed the following checkDST() function which, as far as I
can tell, should be sufficient.
It checks either the date passed to it or the current date with...
|
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
| |
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
| |
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |