Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Microsoft Office > Access and Access VBA > Access
|
Access Discussion of Microsoft Access database design and programming. See also the forums for Access ASP and Access VBA.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Access section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old June 9th, 2006, 10:12 AM
avd avd is offline
Registered User
 
Join Date: Jun 2006
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default You can't save this record at this time

Good Morning,

  Using Access 2003, I have a form w/ subform that when I close, without modifying anything on either form, I receive two messages.

  The first is you cannot save changes - which I supressed with the acDataErrContinue on the Form_Error event.

  Unfortunately, I cannot seem to suppress the next dialog, indicating you cannot save this record at this time.

  Any suggestions would be appreciated.

  Thank you for your time.
 
Old June 9th, 2006, 12:25 PM
Friend of Wrox
 
Join Date: Mar 2004
Posts: 217
Thanks: 0
Thanked 1 Time in 1 Post
Default

Welcome to P2P!

What else does the error messge say? (IE-- is it reporting a key violation?)

And you are sure you nothing is automatically populating to the subform......

HTH,

Loralee

 
Old June 9th, 2006, 04:42 PM
Friend of Wrox
 
Join Date: Dec 2005
Posts: 142
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Do you have any code that pauses or makes certain things appear/disappear/change after a certain amount of time? If the code is still running it can give errors when you try to interrupt it with a close or edit.

 
Old June 9th, 2006, 09:29 PM
avd avd is offline
Registered User
 
Join Date: Jun 2006
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Good Evening,

  Thank you for your replies.

  This form and sub-form have no routines running. They populate based on queries. When it opens it reads the query to populate the fields, however; if nothing is present, then nothing fills the bound controls.

  If nothing fills the bound controls and you attempt to close it, then those two error messages are all you get.

  As stated, I can suppress one with the "acDataErrContinue" in the Form error handler, but I still get the last one.

  Basically it is saying I am attempting to save a record with a missing related record in the base table. But, since there is no data, nothing should be attempting to save.
 
Old June 12th, 2006, 08:29 AM
Friend of Wrox
 
Join Date: Dec 2005
Posts: 142
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Ah, so essentially you're trying to open a form bound to a query that is returning no results? The problem is most likely that Access is defaulting to a blank record for you to create, and doesn't much like when nothing is input into it after it's open. Add a check in your code before opening the form to ensure the recordcount of the query you're pulling data from is greater than zero.






Similar Threads
Thread Thread Starter Forum Replies Last Post
save time umeshtheone Pro VB 6 1 October 23rd, 2007 09:01 AM
Using "now()" to save date and time to database misskaos Classic ASP Basics 12 October 11th, 2006 05:01 PM
One Record at a time Or Panel Control Paging guywonderer Classic ASP Basics 0 August 7th, 2005 05:22 PM
record the time a text box is updated techsp Access 2 August 2nd, 2005 09:51 AM
Save simple record via web form t sql database kbarsi VB Databases Basics 1 January 30th, 2005 11:29 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.