Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Forms / May 2008

Tip: Looking for answers? Try searching our database.

getting reserved error (and others) when delete record on form

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Little Elvis - 07 Apr 2008 11:34 GMT
Hello.
 I have two forms which have four subforms each. The subforms are on tabs
to make them fit neatly.
 I have coded a delete button each form and have the delete code in the
OnDelete event method. This code asks a couple of questions to the user and
then deletes the related records...there could be hundreds of them in two
other tables.
It then writes a record to an audit table. This part is done within a
transaction.

 The delete completes just fine - it appears - then I get a 3167 : Reserved
Error message. I also have got other funny messages like "could not find form
| ..."
 There seems to something funny going on here. Could it be something to do
with the subforms?
  Write now I am eating this error message in the form code..so my testers
don't see it until I get it sorted.

I am using. Access 2002(XP), on Windows Pro XP. The MDB is in 2000 format.

Thanks.
banem2@gmail.com - 07 Apr 2008 12:22 GMT
On Apr 7, 12:34 pm, Little Elvis
<LittleEl...@discussions.microsoft.com> wrote:
> Hello.
>   I have two forms which have four subforms each. The subforms are on tabs
[quoted text clipped - 17 lines]
>
> Thanks.

Error 3167 points to "record is deleted" error. For the start first
make sure database isn't damaged - I recommend you to create new
database and do the File > Get External Data > Import and import all
objects including toolbars and menus. Set Start Up options (if there
are any), go to VBA screen (CTRL+G) and make sure you use same
references.

If the error appears again, let me know.

BTW You are using SQL Server as backend or it is standalone Access
database?

Regards,
Branislav Mihaljev
Microsoft Access MVP
Chris O'C - 07 Apr 2008 12:46 GMT
You didn't mention linked tables on a database server, so I'll assume for now
that you are only using Access.  Access 2002 SP-3 has a bug that gives an
error message when deleting records in bound subforms when using Access
library methods.  Try using SQL in the VBA code to delete the record and
avoid the error message.  Make sure you delete any child records before the
parent record.

   db.Execute "DELETE * FROM TableName WHERE ID = " & Me!ID, dbFailOnError

Chris
Microsoft MVP

>Hello.
>  I have two forms which have four subforms each. The subforms are on tabs
[quoted text clipped - 17 lines]
>
>Thanks.
aaron_kempf@hotmail.com - 09 Apr 2008 17:16 GMT
Warning!

this Chris guy is not credible.
He does not know the basics of MS Access.

I mean 'uh Access has a bug' means MOVE TO SQL SERVER AND ADP!

-Aaron

On Apr 7, 4:46 am, "Chris O'C via AccessMonster.com" <u29189@uwe>
wrote:
> You didn't mention linked tables on a database server, so I'll assume for now
> that you are only using Access.  Access 2002 SP-3 has a bug that gives an
[quoted text clipped - 34 lines]
>
> - Show quoted text -
Chris O'C - 07 Apr 2008 12:47 GMT
You didn't mention linked tables on a database server, so I'll assume for now
that you are only using Access.  Access 2003 SP-3 has a bug that gives an
error message when deleting records in bound subforms when using Access
library methods.  Try using SQL in the VBA code to delete the record and
avoid the error message.  Make sure you delete any child records before the
parent record.

   db.Execute "DELETE * FROM TableName WHERE ID = " & Me!ID, dbFailOnError

Chris
Microsoft MVP

>Hello.
>  I have two forms which have four subforms each. The subforms are on tabs
[quoted text clipped - 17 lines]
>
>Thanks.
Chris O'C - 07 Apr 2008 12:52 GMT
Sorry about the typo.  Should read "Access 2002 SP-3," not Access 2003 SP-3.

Chris
Microsoft MVP

>You didn't mention linked tables on a database server, so I'll assume for now
>that you are only using Access.  Access 2003 SP-3 has a bug that gives an
[quoted text clipped - 13 lines]
>>
>>Thanks.
Alan - 15 May 2008 13:44 GMT
On Apr 7, 6:34 pm, Little Elvis
<LittleEl...@discussions.microsoft.com> wrote:
> Hello.
>   I have two forms which have four subforms each. The subforms are on tabs
[quoted text clipped - 17 lines]
>
> Thanks.

Hi,

The mdb file is probably damaged by the code. If you don't have a
backup, you may try Advanced Access Repair at http://www.datanumen.com/aar/
This tool is rather useful in salvaging damaged Access MDB files. Hope
this helps.

Alan
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.