473,804 Members | 3,049 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Record is deleted error when requiring a related sub-form, how to handle?

176 New Member
Hello.

I have a form with 2 sub-forms in it. One is sfrmFormulation s, other is sfrmCategories. Logically, tblFormulations and tblCategories related on one-to-many basis and have delete and update cascade. In the form, they are kept related by on current event in sfrmFormulation s, which activates a requery in sfrmCategories.

When I delete a record in sfrmFormulation s, I get the following error:
Run-time error '3167'
Record is deleted.

Pressing the debug button, Access takes me to Form_Current sub, to the line:
Expand|Select|Wrap|Line Numbers
  1. Me.Parent.sfrmCategories.Form.Requery
I need some help on how can I handle properly such an event.
Apr 28 '08 #1
2 2420
nico5038
3,080 Recognized Expert Specialist
Check:
http://kbalertz.com/135379/Records-A...-Reopened.aspx
for some detailed information.

Nic;o)
May 18 '08 #2
steal32
2 New Member
I can only take a guess at the cause of the error as you have not listed any code that opens the query or explained in which event this is supposed to happen.To resolve this when you open the access table by using Visual Basic code, include the dbSeeChanges option, as in the following example:

Set rs = db.OpenRecordse t("TestTable" , dbOpenDynaset, dbSeeChanges)


The dbSeeChanges option ensures that any newly added records that contain a default value in the unique index field are available in the current recordset.

If still you get error that means there is corruption in database so you must import your database to new blank one or use stellar phoenix access repair software to repair your database.

Hope it helps
May 30 '08 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

3
2231
by: Chumley the Walrus | last post by:
IN my code behind .vb page for a delete records script (this also does a deletion confirmation with a javascript popup, this gets called on my front .aspx page with the datagrid), I'm not sure if he row.delete() in my Delete_Row sub is correct because when deleting a record from the dbase, it doesnot get deleted from the actual database, even tho on the datagrid it does show that the record is deleted: '''''''''''''
1
1949
by: GGerard | last post by:
Hello I am working with Access 2000 I have two tables joined on a one to many relationship between two fields: Table1:FieldID (one) is joined to Table2:FieldMyID (many) Field Properties setting: FieldID : Field Size - Long Integer New Values - Increment
20
2151
by: Bryan | last post by:
hello all... im trying to add a record to an sql db on ms sql server 2000, using vb.net. seems to be working.. except for one thing, one of the columns in the database is a bit datatype, and though i get no syntax errors when compiling, i get an error indicated that the data would be truncated. the field is login_status. ive tried in quotes and not, giving it an integer variable with the number 1
4
1777
by: Stanav | last post by:
Hello all, When a user click on the "Update" button on my program, I want to update the database using the sub below. I was able to insert and modify records, but can't delete records. The error reads: "Deleted row information cannot be accessed through the row". I understand that when I refer to dr.Item(0) but that datarow had been deleted thus I cannot get the data.... Is there any workaround to this? Thanks for reading. VhD50
3
2420
by: PAUL | last post by:
Hello, I have 2 datasets I am trying to update. The parent table seems to update fine but when I go update the chiled table I get an error message that says I need a related record in the parent table. However I put some code in to display the key field of each parent table record (parent dataset) and the value I am trying to put into the child table is there. ParentTable ChildTable ID------------------------<...
0
3574
by: André | last post by:
Hi, Still the same (unsolved problem), but other error now. I have a detailsview for inserting data, and a dropdownlist which selectedValue must be used to fill one of the field of the detailsview. Table 'pc' is related to table 'lok'. I tried a lot of things, but still without succes. Here are the two methods i tried with two different errors. It works only when i introduce directly a value in "DefaultValue" (see below)
3
6130
by: igendreau | last post by:
I'm trying to clean up a database of mine, and I need to convert some old DAO code over to ADO. When I was using DAO, I had no problem running this script and deleting the record using rs.Delete. But when I rework the code in ADO, it tells me I can't delete it because there are related records in another table. Never had that problem in DAO and I haven't touched the relationships. Ignore most of this code and focus on the recordset "rs"....
3
16042
by: Kosmos | last post by:
Hey ya'll...I can't seem to figure out why I'm getting this error message, but it all started when I added the new line of code with the recSet5.AddNew --- when I ran the first line, the logic worked and the fields were populated properly, when I added all the rest, it wouldn't run and even when I tried to go back, it still won't run now...I am getting the following error message: "Either BOF or EOF is True, or the current record has been...
12
5583
by: magmike | last post by:
Accidentally deleted a record. Anyway to get it back? If not, I know the ID number - which is an autonumber field. Because of the related data from other tables, would I be able to create a new record and make its ID number, that of the deleted record? Thanks! magmike
2
2910
by: jim | last post by:
I have an access 2003 database and i was having a few problems with it- for instance every time i tried a compact and repair, access would crash out - I tried exporting each table to a new database and on exporting one of the tables i receive the error message 'Record is deleted.' On looking through the records of said table i find that there is indeed a record listed as '#Deleted' and I can't seem to get rid of it... I have deleted any...
0
9704
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
10319
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...
1
10303
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10070
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
9132
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7608
isladogs
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...
0
5639
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4282
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
2
3803
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.