473,480 Members | 1,737 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

ADODB.Recordset Related record required

12 New Member
ADODB.Recordset Related record required
Hi all-
I'm working on a tool that exports worksheets from Excel to Access tables. On an Update statement, I'm getting the following message: "Run-Time Error '-2147217873 (80040e2f)': You cannot add or change a record because a related record is required in table 'Customer'." But the error is thrown (apparently) at random. Not only is there no relationship with the 'Customer' table, but there is nothing in common between the lines on which the error is thrown.

I'm not sure how much of this actually has to do with code, so I'm going to hold off on that. I'm using Access 2013, and the program is written in an Excel 2013 Macro. If there is any more information needed, please let me know and I would be happy to provide it.

Thank you so much!
Jul 13 '15 #1
5 1132
jimatqsi
1,271 Recognized Expert Top Contributor
RW,
Tell us more details. What table is being populated? What fields are being populated?

If you can tell what row is causing the problem, try keying that row in to the target table manually. When you finish the row you may get a more detailed error message.

Jim
Jul 13 '15 #2
RadioWriter
12 New Member
Many apologies, Jim. The table being populated was called BOM Detail. But because of the space, the code was referencing a different table called BOM. The issue no longer occurs (added square brackets around the name). Thank you for your time, and I'm very sorry for the inconvenience.
Jul 13 '15 #3
RadioWriter
12 New Member
Solutions Found - Assistance no longer required

Sorry for the inconvenience-
After posting I tried editing a few more things and found that all of my problems were caused by a space in the table name.
Jul 13 '15 #4
NeoPa
32,556 Recognized Expert Moderator MVP
No need for apologies.

As it happens, and for reasons I won't bore you with unless you express an interest, we prefer to keep the originals in play even when the question has been answered fully and satisfactorily.

That you came up with your own solution is perfectly fine and we're happy that you no longer need assistance in this particular case.

Feel free to post more questions here. Your actions indicate an attitude that we appreciate :-)
Jul 14 '15 #5
RadioWriter
12 New Member
Not a problem. When I actually stop to think about it, it makes sense to keep the original questions in play (so others with similar problems can find the answer to whatever they've searched). I just hadn't really thought about it. ^^; I'll keep it in mind in case something similar happens in the future.
Jul 14 '15 #6

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

Similar topics

6
8813
by: Joe | last post by:
I want to add a new record to database, and then retrives the @@IDENTITY value for this ne added record, and the fields of this record. However, it has the following error on line varNewID =...
0
3175
by: elvin | last post by:
Okay - apologize in advance for the length, but I want to make sure all you knowledgeable and helpful people have all the details you need to hopefully point my newbie rear in the right direction....
5
29780
by: Simone | last post by:
Hello I hope you guys can help me. I am very new to ADO... I am creating a ADODB connection in a module and trying to access it from a command button in a form. Function fxEIDAssgn(plngEID As...
6
10796
by: James | last post by:
I am writing a web service for a classic ASP application. I need to consume an ADO recordset and then send it to another web service for processing. I found an MSDN ariticle telling how to do this...
2
2165
by: ramia1983 | last post by:
All i am doing is trying to write info to a access database but iget this error Error Type: ADODB.Recordset (0x800A0BCD) Either BOF or EOF is True, or the current record has been deleted....
3
6076
by: mark_aok | last post by:
Hi all, All I am trying to do is open a table, edit it, and then close it. But I am having the strangest error. Here is my code Dim i as integer Dim rs as adodb.recordset Set rs = new...
1
10109
by: sphinney | last post by:
All, I have a ADODB.Recordset in my Access 2002 project. I've been able to successfully add fields to the record set. According the the MS Access help files, I now must update the recordset to...
6
5138
by: Oko | last post by:
I'm currently developing an MS Access Data Project (.adp) in MS Access 2002. One of the reports within the DB uses data that is Dynamic and cannot be stored on the SQL Server. To resolve this, I...
4
3082
by: PW | last post by:
Hi, I set up a relationship between two tables with the itineraryid fields in both tables: tblDailyItinerary tblDailyMeals I have a form that writes a record to tblDailyItinerary that...
0
7039
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,...
0
6904
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...
1
6735
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...
0
6895
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...
0
5326
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,...
1
4770
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...
0
4476
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...
0
2977
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1296
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 ...

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.