RE: Want to eliminate standard msg - You can't save this record at this time

  • Thread starter Eric Butts [MSFT]
  • Start date
E

Eric Butts [MSFT]

Hi,

After the line after Cancel = True add the line

Me.Dirty = False


Regards,

Eric Butts
Microsoft Access Support
(e-mail address removed)
"Microsoft Security Announcement: Have you installed the patch for
Microsoft Security Bulletin MS03-026? If not Microsoft strongly advises
you to review the information at the following link regarding Microsoft
Security Bulletin MS03-026
<http://www.microsoft.com/security/security_bulletins/ms03-026.asp> and/or
to visit Windows Update at <http://windowsupdate.microsoft.com/> to install
the patch. Running the SCAN program from the Windows Update site will help
to insure you are current with all security patches, not just MS03-026."

This posting is provided "AS IS" with no warranties, and confers no rights

--------------------
| Thread-Topic: Want to eliminate standard msg - You can't save this record
at this time
| thread-index: AcRMpdaDwId5VJzSSuuQTeHMLCBC/g==
| X-WN-Post: microsoft.public.access.formscoding
| From: "=?Utf-8?B?RG91Zw==?=" <[email protected]>
| Subject: Want to eliminate standard msg - You can't save this record at
this time
| Date: Mon, 7 Jun 2004 08:41:02 -0700
| Lines: 24
| Message-ID: <[email protected]>
| MIME-Version: 1.0
| Content-Type: text/plain;
| charset="Utf-8"
| Content-Transfer-Encoding: 7bit
| X-Newsreader: Microsoft CDO for Windows 2000
| Content-Class: urn:content-classes:message
| Importance: normal
| Priority: normal
| X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
| Newsgroups: microsoft.public.access.formscoding
| Path: cpmsftngxa10.phx.gbl
| Xref: cpmsftngxa10.phx.gbl microsoft.public.access.formscoding:234945
| NNTP-Posting-Host: tk2msftcmty1.phx.gbl 10.40.1.180
| X-Tomcat-NG: microsoft.public.access.formscoding
|
| I have a Access 2002 bound form that prompts a user if they want to save
a record (if the form was dirty) when they try to close the form without
saving first. The before_update event includes the following code:

Private Sub Form_BeforeUpdate(Cancel As Integer)
On Error GoTo err_form_beforeupdate


If Me.Dirty Then
Response = MsgBox(Msg, Style, title) ' ask if want to save record
If Response = vbNo Then
Me.Undo
Cancel = True
GoTo exit_form_beforeupdate
End If
End If

My problem is that when the user says 'no' they don't want to save, Access
still displays the message:
You can't save this record at this time.

IME*Centric may have encountered an error while trying to save a record.
If you close this object now, the data changes you made will be lost. Do
you want to close the database object anyway?

I don't want the users to see this message, I just want to close the form.
How do I prevent this?



|
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top