473,738 Members | 11,192 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How to avoid default "can't save form at this time" message?

I have non-computer skilled users entering data into a form. There
are certain ranges of values which, if they enter them, make no sense
in the application, but I can't test them until they try to close out
the form, in which case I can look at the entire set of values and see
if they're OK. So, I have this code.

for the "Before Update" event:

if (their variables are inappropriate) then
msgbox "You've entered bad variables (or some such message),
go back and fix them", vbexclamation
cancel = true
end if
end sub

This works fine, except that the user gets the following message
(which I want suppressed):
"You can't change the record at this time. If you close this object
now, all the data changes you have made will be lost. Do you want to
close the databases object anyway?"
YES NO
The default is "yes," which I don't want them to get.
I don't want them to get this message, because it happens rarely and
the users don't understand it. I just want my "cancel=tru e" statement
to kill the update process and return them to the form, without any
further word from Bill Gates. How do I do that?
Thanks. Pete Brady
Nov 13 '05 #1
2 7976
Hi Pete

If you have users who find this message mildly annoying, ask them whether
they would prefer Access to just silently lose their entry without telling
them. Microsoft is giving them the choice: they can go back and fix the
entry, or throw the entry away and get out of there. That's a pretty useful
choice.

They only get that choice if they try to close the form when it contains an
unsavable entry. You can try to work around that by disabling the Close
button on the form, building a custom menu so they can't choose Close from
the File menu or switch views from the View menu, or apply a filter or sort
from the Records menu, apply a custom toolbar to remove all the problem
buttons, reprogram the keystrokes such as Ctrl+F4 and Alt+F4 with an
AutoKeys macros, and run API calls to remove the close button from the main
Access window.

Or you could programmaticall y set module-level flags that let you cancel the
UnLoad event of the form and generate even more annoying message boxes and
end up corrupting the database as frustrated users who can't get out of
their form terminate Access with the Windows Task Manager or by switching
off their database.

Or, you could add a Cancel button to your form to give them another way out:
If Me.Dirty Then Me.Undo
DoCmd.Close acForm, Me.Name

BTW, there is a serious bug with the Close action that *does* cause it to
silently lose what the user entered if it cannot be saved:
http://allenbrowne.com/bug-01.html

--
Allen Browne - Microsoft MVP. Perth, Western Australia.
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

"Paul Brady" <pt*****@aol.co m> wrote in message
news:2c******** *************** *********@4ax.c om...
I have non-computer skilled users entering data into a form. There
are certain ranges of values which, if they enter them, make no sense
in the application, but I can't test them until they try to close out
the form, in which case I can look at the entire set of values and see
if they're OK. So, I have this code.

for the "Before Update" event:

if (their variables are inappropriate) then
msgbox "You've entered bad variables (or some such message),
go back and fix them", vbexclamation
cancel = true
end if
end sub

This works fine, except that the user gets the following message
(which I want suppressed):
"You can't change the record at this time. If you close this object
now, all the data changes you have made will be lost. Do you want to
close the databases object anyway?"
YES NO
The default is "yes," which I don't want them to get.
I don't want them to get this message, because it happens rarely and
the users don't understand it. I just want my "cancel=tru e" statement
to kill the update process and return them to the form, without any
further word from Bill Gates. How do I do that?
Thanks. Pete Brady

Nov 13 '05 #2
On Fri, 22 Jul 2005 09:51:37 +0800, "Allen Browne"
<Al*********@Se eSig.Invalid> wrote:
Hi Pete

If you have users who find this message mildly annoying, ask them whether
they would prefer Access to just silently lose their entry without telling
them. Microsoft is giving them the choice: they can go back and fix the
entry, or throw the entry away and get out of there. That's a pretty useful
choice.


Allen, Thanks for your reply. I know you realize this, but my users
don't find the message "mildly annoying," but rather, completely
mystifying, and they get blown away when they see some of the weird
and convoluted messages Microsoft produces. So, in this case I myself
gave them the choice to save their "bad" variables or go back, and
this choice worked well, except that the Microsoft message now comes
in on top of my more "friendly" message. I guess we will just have to
live with it. Maybe I should print a message that says something
like,
"You IDIOT! You can't have someone's birthdate later than today's
date!" (Incidentally, I catch that one right away when the leave the
Birthdate control field, well before they try to close out the form.)

I have printed your reply and will see if I can manage to live with
the way things are. Thanks. Pete
Nov 13 '05 #3

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

Similar topics

1
1490
by: Tom LeBold | last post by:
What is the default time out on an Active Server Page?
2
2982
by: Kit Truong | last post by:
Hello, I have an asp page that produces output from a database. This allows a simple way for the user to save the data to a text file by going to File->Save as... The default save as options always defaults to a particular filename and the save as type is always html, therefore the user has to manually type a filename and choose Text File (*.txt) as the type.
27
5086
by: Curious Angel | last post by:
I have a resume in PDF format and I want anyone who LEFT-OR-RIGHT clicks the link to force the file to be saved, and in any event _not_ opened. Since the PDF will be in his cache in any event, I would just as soon place the employer in control of what directory he wishes to save it in, and there are two salient reasons for this: 1. I want him to OWN the document 2. I want him to FIND the document, quickly, on his hard drive In any...
6
3166
by: jer | last post by:
I have created a subroutine that opens a report in design view, modifies the report (adds text boxes and grouping levels, etc.) then opens in preview mode. I want to be able to close the report without saving the changes, and without being prompted to save the changes. It is easy enough to get rid of the save prompt by using docmd.setwarnings=false; however, the default behavior of Access is to save the design changes. I can't seem to...
1
2003
by: welles.lo | last post by:
Hi all, I found that the default "can grow" in Crystal Reports 10 is different from the one in Crystal Report 9. In version 9, when "can grow" is disable, the words in the field are chopped off and doesn't not warp around to the next line. In version 10, when "can grow" is disable ,the text would overlap the field next to it if the text is too long, to make it field behave the
6
4615
by: ZRexRider | last post by:
I've been reading the newsgroups and most of the solutions for this message are simple and obvious but unfortunately don't solve my problem. I have an MS-Access 2002 ADP application that connects to SQL server. The application is deployed to 100+ users and in most cases works fine. I have a sub-set of users (~20) who have an auditing function. They review transactions entered by the other 100+ and accept or reject them. There are a...
0
1703
by: zhif | last post by:
What will the potential reason cause the following two error messages. 2007-04-13-10.41.26.994282-240 I117470C515 LEVEL: Error PID : 57806 TID : 1 PROC : db2agentg (HAMDB2 ) 0 INSTANCE: db2inst1 NODE : 000 DB : LETMAP APPHDL : 0-703 APPID: CF82B7D0.DD39.070411155341 FUNCTION: DB2 UDB, DRDA Application Server,...
3
3695
by: Jon Davis | last post by:
I've migrated my development workstation from 32-bit Windows Server 2003 to Windows Vista Ultimate x64. I added my .NET web applications under development to IIS. I configured the apps to use a custom App Pool based on the Classic AppPool which is based on .NET 2.0. Now every time I open them in Visual Studio 2005, I get this message: ------------------------------------- The site 'http://localhost/' is currently configured for use...
11
1570
by: moltendorf | last post by:
Alright, another question to pin on the experts. :D I have an issue with "this" keyword in this case. The way I got around it before was to use a window property, but in this case I'm trying to keep everything within the context of the object. So... Basically, this is referring to what I wanted it to refer to before (well, it worked in Mozilla, but not in IE, so I used the window workaround to fit both browsers). What I want to do...
0
8969
marktang
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...
0
8788
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9476
Oralloy
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...
0
9335
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 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...
0
9208
tracyyun
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...
0
6053
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4570
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...
1
3279
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
3
2193
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.