473,396 Members | 2,070 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

2nd Subform disconnect from 1st Subform

I have an existing Database which I have modified to new dbase with the same structure (1 Main and 2 subforms- 2nd subform corresponds to the 1st subform) but I have changed the names/ labels (not the fields name) and added more fields data. I’m trying to do a shortcut I thought it will be easier to copy the existing dbase add fields and change the name labels. but it looks like I ended up disconnecting the 2nd subform. The main form and 1st subform are OK except that 2nd subform. Whenever I click to update the 2nd subform it goes “Run Time Error ‘2465’….can’t find the Transaction ID (primary key of 1st subform) referred in your expression.” Then it goes to “Object Invalid or no longer set”. Any idea where should I start looking into?
Thanks- appreciate any help!
Access 2000
Vista
Mar 10 '08 #1
2 1284
The SQL below gets hi-lighted when the error appears. For some reason it's not seeing the 'Transaction ID' but it's there. It works on the original Dbase where I copied it.

DoCmd.RunSQL "UPDATE [Inventory Transactions] SET [Inventory Transactions].[Qty Shipped] = " & Me.TextTotal & _
" WHERE (([Inventory Transactions].[Transaction ID])=" & Me.[Transaction ID] & _
" AND ([Inventory Transactions].[Purchase Order ID])= " & Me.[Purchase Order ID] & ");"

Thanks again,
John



I have an existing Database which I have modified to new dbase with the same structure (1 Main and 2 subforms- 2nd subform corresponds to the 1st subform) but I have changed the names/ labels (not the fields name) and added more fields data. I’m trying to do a shortcut I thought it will be easier to copy the existing dbase add fields and change the name labels. but it looks like I ended up disconnecting the 2nd subform. The main form and 1st subform are OK except that 2nd subform. Whenever I click to update the 2nd subform it goes “Run Time Error ‘2465’….can’t find the Transaction ID (primary key of 1st subform) referred in your expression.” Then it goes to “Object Invalid or no longer set”. Any idea where should I start looking into?
Thanks- appreciate any help!
Access 2000
Vista
Mar 10 '08 #2
Stewart Ross
2,545 Expert Mod 2GB
The SQL below gets hi-lighted when the error appears. For some reason it's not seeing the 'Transaction ID' but it's there. It works on the original Dbase where I copied it.

DoCmd.RunSQL "UPDATE [Inventory Transactions] SET [Inventory Transactions].[Qty Shipped] = " & Me.TextTotal & _
" WHERE (([Inventory Transactions].[Transaction ID])=" & Me.[Transaction ID] & _
" AND ([Inventory Transactions].[Purchase Order ID])= " & Me.[Purchase Order ID] & ");"

Thanks again,
John
Hi John. Could it be that you have accidentally changed the name of your [Transaction ID] control to something different when you changed names/labels? It is the control name as placed on the form that is being referenced by Me.[Transaction ID], not the name of the underlying field to which it is bound.

-Stewart
Mar 10 '08 #3

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

Similar topics

3
by: Sven Jacobs | last post by:
Dear newsgroup, I've upgraded to PEAR::DB 1.6.5 recently. Unfortunately now the database connection doesn't work as expected anymore :( The problems seems to be the method disconnect(), which...
0
by: Amir | last post by:
Hi, According to Application Programming and SQL Guide chapter 29: "If DB2 terminates, a task that issued CONNECT must issue DISCONNECT to reset the CAF control blocks. The function returns...
0
by: sneal | last post by:
A little background: We have an Access 2002 based user interface to our SQL Server 2000 database. The interface is a tabbed form with two of the tabs containing a subform. Data is pulled from the...
2
by: http://www.visual-basic-data-mining.net/forum | last post by:
Say i have declare a module for connection and two buttons... one button has the method connect() and the other has the method disconnect().... how do i actually connect after i had disconnect...
1
by: Maximus | last post by:
hi all, I want to kow if there is a way to connet a machine using a VPN client through vb.net or c# code. I have requirement where i need to copy file using VPN. Hence, I need to start the...
0
by: mamod20 | last post by:
Please advise, I have the following example and want to know the best way to use $dbh->disconnect; and $sth->finish; -------------- $sql_host="localhost"; $sql_dataname = "database";...
3
by: Laurence | last post by:
Hi there, Does anyone know what's difference among "connect reset", "disconnect", and "terminate"? Thanks in advance,
3
by: xincmu | last post by:
I built a very basic server-client in C#. When my server disconnects from the client, the socket at the server is already disconnected, but the socket the client remains open. I used the sample...
9
by: Kelii | last post by:
Currently I have a button that allows the user to "Close Company" - at the moment it doesn't do anything :D I would like the button to "disconnect" the back end then show my Open Company form. ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
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
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...
0
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...
0
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,...

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.