473,749 Members | 2,464 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Trying To Reference SubForm: "2467 Object closed or does not exist"?

I've got a parent form and three subforms.

Two of them work A-OK.

For the third one, in the Immediate window:
-----------------------------------------
?Me.subDeal.Nam e
subDeal

?Me.subDeal.Sou rceObject
frmDeal_Deal

?Me.subDeal.Rec ordSource
2467 - Object closed or does not exist
-----------------------------------------

So it seems like it sort of exists, but doesn't exist.... depending on what
props I try to get to.

Tried SaveAsText and then LoadFromText, but nothing changed.

I recall similar situations years ago and hazily recall that in one of them it
was something to with not having any records behind the subform... but I've got
a dummy table there... (I think.... because I can't check it in Immediate or
in code).

Anybody been here?
--
PeteCresswell
Jul 14 '06 #1
5 4718
Per (PeteCresswell) :
>So it seems like it sort of exists, but doesn't exist.... depending on what
props I try to get to.
Oh yeah... and all 3 subforms are in separate tabs on a Tab control... and
there's also a Tree control on the form.
--
PeteCresswell
Jul 15 '06 #2
On Fri, 14 Jul 2006 20:03:24 -0400, "(PeteCresswell )" <x@y.Invalidwro te:
>I've got a parent form and three subforms.

Two of them work A-OK.

For the third one, in the Immediate window:
-----------------------------------------
?Me.subDeal.Na me
subDeal

?Me.subDeal.So urceObject
frmDeal_Deal

?Me.subDeal.Re cordSource
2467 - Object closed or does not exist
-----------------------------------------
?Me.subDeal.For m.Recordsource

Recordsource is a property of the form contained in the subform control, not of
the subform control itself.

Me.subDeal.Name and Me.subDeal.Sour ceObject work because they are referring to
properties of the subform control itself.
>
So it seems like it sort of exists, but doesn't exist.... depending on what
props I try to get to.

Tried SaveAsText and then LoadFromText, but nothing changed.

I recall similar situations years ago and hazily recall that in one of them it
was something to with not having any records behind the subform... but I've got
a dummy table there... (I think.... because I can't check it in Immediate or
in code).

Anybody been here?
Wayne Gillespie
Gosford NSW Australia
Jul 15 '06 #3
Per Wayne Gillespie:
>?Me.subDeal.Fo rm.Recordsource

Recordsource is a property of the form contained in the subform control, not of
the subform control itself.
I mis-typed in the post.

Here's a Copy/Paste from the actual VBA:
---------------------------------------------
9020 With Me
9021 .subDeal.Form.R ecordSource = ""
9022 .subMetrics.For m.RecordSource = ""
9023 .subPaymentHist ory.Form.Record Source = ""
9024 .subPriceHistor y.Form.RecordSo urce = ""
9025 .subTranche.For m.RecordSource = ""
9029 End With

9030 WorkTable_Creat e "ttblDealCache_ Deal", "zmtblDealCache _Deal"
9031 WorkTable_Creat e "ttblDealCache_ MetricHistory",
"zmtblDealCache _MetricHistory"
9032 WorkTable_Creat e "ttblDealCache_ PaymentHistory" ,
"zmtblDealCache _PaymentHistory "
9033 WorkTable_Creat e "ttblDealCache_ PriceHistory",
"zmtblDealCache _PriceHistory"
9034 WorkTable_Creat e "ttblDealCache_ Tranche", "zmtblDealCache _Tranche"
9039 WorkTable_Creat e "ttblDealCache_ TrancheFund", "zmtblDealCache _TrancheFund"

9040 With Me
9041 .subDeal.Form.R ecordSource = "ttblDealCache_ Deal"
9042 .subMetrics.For m.RecordSource = "qryDeal_Metric History"
9043 .subPaymentHist ory.Form.Record Source = "qryDeal_Paymen tHistory"
9044 .subPriceHistor y.Form.RecordSo urce = "qryDeal_PriceH istory"
9045 .subTranche.For m.RecordSource = "qryDeal_Tranch e"
9049 End With
---------------------------------------------

To me, the puzzler is why .subDeal fails and the other four work.

I *know* I've been here before but cannot remember what the cause was.
--
PeteCresswell
Jul 15 '06 #4
On Sat, 15 Jul 2006 12:33:25 -0400, "(PeteCresswell )" <x@y.Invalidwro te:
>Per Wayne Gillespie:
>>?Me.subDeal.F orm.Recordsourc e

Recordsourc e is a property of the form contained in the subform control, not of
the subform control itself.

I mis-typed in the post.

Here's a Copy/Paste from the actual VBA:
---------------------------------------------
9020 With Me
9021 .subDeal.Form.R ecordSource = ""
9022 .subMetrics.For m.RecordSource = ""
9023 .subPaymentHist ory.Form.Record Source = ""
9024 .subPriceHistor y.Form.RecordSo urce = ""
9025 .subTranche.For m.RecordSource = ""
9029 End With

9030 WorkTable_Creat e "ttblDealCache_ Deal", "zmtblDealCache _Deal"
9031 WorkTable_Creat e "ttblDealCache_ MetricHistory",
"zmtblDealCach e_MetricHistory "
9032 WorkTable_Creat e "ttblDealCache_ PaymentHistory" ,
"zmtblDealCach e_PaymentHistor y"
9033 WorkTable_Creat e "ttblDealCache_ PriceHistory",
"zmtblDealCach e_PriceHistory"
9034 WorkTable_Creat e "ttblDealCache_ Tranche", "zmtblDealCache _Tranche"
9039 WorkTable_Creat e "ttblDealCache_ TrancheFund", "zmtblDealCache _TrancheFund"

9040 With Me
9041 .subDeal.Form.R ecordSource = "ttblDealCache_ Deal"
9042 .subMetrics.For m.RecordSource = "qryDeal_Metric History"
9043 .subPaymentHist ory.Form.Record Source = "qryDeal_Paymen tHistory"
9044 .subPriceHistor y.Form.RecordSo urce = "qryDeal_PriceH istory"
9045 .subTranche.For m.RecordSource = "qryDeal_Tranch e"
9049 End With
---------------------------------------------

To me, the puzzler is why .subDeal fails and the other four work.

I *know* I've been here before but cannot remember what the cause was.
Have you tried making the recordsource of .subDeal a query instead of the table?
I have no idea why this would make a difference, but it is the only difference I
can see between the 5 calls.
Wayne Gillespie
Gosford NSW Australia
Jul 15 '06 #5
Per Wayne Gillespie:
>
Have you tried making the recordsource of .subDeal a query instead of the table?
I have no idea why this would make a difference, but it is the only difference I
can see between the 5 calls.
I resisted the temptation for awhile - but now that you've said it too, gave it
a try. No-go.

What I did do, however, was completely rebuild the form from scratch and guess
what?.... All problems magically went away.

I copied the VBA code from the old form to the new form, didn't rebuild the
subforms, but did create all objects in the new form from scratch.

Now that I've done it, I'm positive that I went through this at least once -
maybe twice - some years ago. Same scenario: parent form with a TreeView
control and several subforms... goofy stuff with semi-existing Form objects on
the subs... and a couple of other things. I even found some notes in an old app
about the TreeView acting strange if the form it resided on didn't have a
..RecordSet....

For now, I'll put my money on MS's TreeView control (MSComctlLib.Tr eeCtrl.2). It
definitely acts goofey at times in other ways... and I suspect it's a little
shaky.
--
PeteCresswell
Jul 15 '06 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
20372
by: Pablo J Royo | last post by:
Hello: i have a function that reads a file as an argument and returns a reference to an object that contains some information obtained from the file: FData &ReadFile(string FilePath); But , for example, when the file doesnt exists, i should not return any reference to a bad constructed object, so i need something as a NULL reference object. I suppose i could return a pointer instead, but i have some code written with references which...
2
13410
by: brazilnut52 | last post by:
I am going to outline the steps I go through to produce the problem. Hopefully this will help you understand the problem better I have created a simple COM DLL in .NET by using the COM class template and by setting output to a type library (DLL). All the object does is return a string value. At this point I have not checked the option to register for COM interop in Visual Studio So I go into Excel (where I want to use the object). Go to VB...
7
42575
by: Bennett Haselton | last post by:
Is there any way to find a string representing an object's class, which will work in Internet Explorer 6? "typeof" doesn't work -- it returns "object" for all objects: x = window.open('http://www.yahoo.com/'); alert(typeof x); And I found this page: http://www.mozilla.org/js/language/js20-2002-04/core/expressions.html
0
2665
by: Dirk Försterling | last post by:
Hi all, a few days ago, I upgraded from PostgreSQL 7.2.1 to 7.4, following the instructions in the INSTALL file, including dump and restore. All this worked fine without any error (message). Since then, I found lots of the following in the postmaster output: 2003-11-29 15:19:54 ERROR: large object 4838779 does not exist 2003-11-29 15:20:11 ERROR: large object 4838779 does not exist
2
3620
by: Rajat Tandon | last post by:
Hi, I have a grid which is continuously updating by the data from a external event. When I close the form on which the grid is placed, then it gives the error message ... "Can not access a disposed object". I understand that it is because as soon as the form is closed it will in turn try to dispose the grid. I have unwired the event in the dispose of
5
3343
by: Frederick Gotham | last post by:
If we have a simple class such as follows: #include <string> struct MyStruct { std::string member; MyStruct(unsigned const i) {
10
4371
by: desperateloser | last post by:
1st - This is likely pathetically simple and not at all what this site is for, being mostly a snafu using regular Acess stuff and not at all coding or scripting. Please be merciful - I'm really very desperate. I'm trying to use Access 2002 to set up a simple mailing database, then make labels using it. I created the database with all the fields and entered the data, saved it, and have tried to use the Label Wizard several times to no avail...
3
2990
by: =?Utf-8?B?QmFkaXM=?= | last post by:
I'm doing a server side automation(I know it's bad but..) and its working fine locally and when accessing it from a remote machine using web browser is was giving me this error"Retrieving the COM class factory for component with CLSID {000209FF-0000-0000-C000-000000000046} failed due to the following error: 80070005". so I configured the server using dcomcnfg as described in this link: http://support.microsoft.com/kb/288368/ and know...
6
6584
by: weston | last post by:
In Access 2000 I have a form with a tab control with 3 tabs. I have a button that is supposed to check if each question on the form has been completed. The code that is under this button is below. It works for the questions on the first 2 tabs but when it gets to the questions on the 3rd tab I get the following error message "The expression you entered refers to an object that is closed or doesn't exist". This code does work properly on...
0
8996
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
9566
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
9333
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
9254
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
8256
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...
0
6078
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4879
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3319
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
3
2217
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.