473,383 Members | 1,748 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,383 software developers and data experts.

Why this 2467 error?

Using A2K. Have the following code in a form just before a subform is
requeried:

Select Case Me.cboEvaluations
Case "Ambulatory Medicine"
Me.subfrmEvaluations.SourceObject =
"subfrmEvals_AmbulatoryMedicine"
{...snipped...}
End Select

Me.subfrmEvaluations.Requery

Me.subfrmEvaluations!txtAttending = rstSSN!LastName
I get a 2467 error "...object closed or doesn't exist" when the last
statement is executed. The Case statement sets the SourceObject of
subfrmEvaluations. txtAttending does exist on the subform. But even
if I comment that line out, the subfrm does not display.
Me.subfrmEvaluations.Name displays the correct SourceObject name.

Any advice or help is appreciated.

Nov 13 '05 #1
9 3868

ma**********@hotmail.com wrote:
Using A2K. Have the following code in a form just before a subform is
requeried:

Select Case Me.cboEvaluations
Case "Ambulatory Medicine"
Me.subfrmEvaluations.SourceObject =
"subfrmEvals_AmbulatoryMedicine"
{...snipped...}
End Select

Me.subfrmEvaluations.Requery

Me.subfrmEvaluations!txtAttending = rstSSN!LastName
I get a 2467 error "...object closed or doesn't exist" when the last
statement is executed. The Case statement sets the SourceObject of
subfrmEvaluations. txtAttending does exist on the subform. But even
if I comment that line out, the subfrm does not display.
Me.subfrmEvaluations.Name displays the correct SourceObject name.

Any advice or help is appreciated.


Try (air code):

Me.subfrmEvaluations.Form!txtAttending = rstSSN!LastName

James A. Fortune

Nov 13 '05 #2
Thanks for your reply but I tried that before posting and got the same
error.

ji********@compumarc.com wrote:
ma**********@hotmail.com wrote:
Using A2K. Have the following code in a form just before a subform is
requeried:

Select Case Me.cboEvaluations
Case "Ambulatory Medicine"
Me.subfrmEvaluations.SourceObject =
"subfrmEvals_AmbulatoryMedicine"
{...snipped...}
End Select

Me.subfrmEvaluations.Requery

Me.subfrmEvaluations!txtAttending = rstSSN!LastName
I get a 2467 error "...object closed or doesn't exist" when the last
statement is executed. The Case statement sets the SourceObject of
subfrmEvaluations. txtAttending does exist on the subform. But even
if I comment that line out, the subfrm does not display.
Me.subfrmEvaluations.Name displays the correct SourceObject name.

Any advice or help is appreciated.


Try (air code):

Me.subfrmEvaluations.Form!txtAttending = rstSSN!LastName

James A. Fortune


Nov 13 '05 #3

manning_n...@hotmail.com wrote:
Thanks for your reply but I tried that before posting and got the same
error.


Leave it that way. The next step would be to see if you closed the
recordset earlier in the code.

James A. Fortune

Nov 13 '05 #4
Recordset is open.
ji********@compumarc.com wrote:
manning_n...@hotmail.com wrote:
Thanks for your reply but I tried that before posting and got the same
error.


Leave it that way. The next step would be to see if you closed the
recordset earlier in the code.

James A. Fortune


Nov 13 '05 #5
ma**********@hotmail.com wrote:
Recordset is open.


What happens when you comment out the Me.subfrmEvaluations.Requery and
msgbox both Me.subfrmEvaluations.Form!txtAttending and rstSSN!LastName?

James A. Fortune

Nov 13 '05 #6
rstSSN!LastName displays a name, as it should. But ...txtAttending
gives me the error message again. So somehow the subform is getting
closed or unavailable for some reason.

Hey thanks for your help on this.
ji********@compumarc.com wrote:
ma**********@hotmail.com wrote:
Recordset is open.


What happens when you comment out the Me.subfrmEvaluations.Requery and
msgbox both Me.subfrmEvaluations.Form!txtAttending and rstSSN!LastName?

James A. Fortune


Nov 13 '05 #7
ma**********@hotmail.com wrote:
rstSSN!LastName displays a name, as it should. But ...txtAttending
gives me the error message again. So somehow the subform is getting
closed or unavailable for some reason.

Hey thanks for your help on this.


It was kind of you to thank me.

If Me.subfrmEvaluations.Form!txtAttending came up with 'Object closed
or doesn't exist' and the requery works then make sure txtAttending is
the exact spelling of the textbox on the subform.

James A. Fortune

Nov 13 '05 #8
I fixed the problem by setting the LinkChildFields and LinkMasterFields
in code. Apparently you can't do it thru the subform when setting the
SourceObject using code.

But it works now

Thanks again.
ji********@compumarc.com wrote:
ma**********@hotmail.com wrote:
rstSSN!LastName displays a name, as it should. But ...txtAttending
gives me the error message again. So somehow the subform is getting
closed or unavailable for some reason.

Hey thanks for your help on this.


It was kind of you to thank me.

If Me.subfrmEvaluations.Form!txtAttending came up with 'Object closed
or doesn't exist' and the requery works then make sure txtAttending is
the exact spelling of the textbox on the subform.

James A. Fortune


Nov 13 '05 #9
ma**********@hotmail.com wrote:
I fixed the problem by setting the LinkChildFields and LinkMasterFields
in code. Apparently you can't do it thru the subform when setting the
SourceObject using code.

But it works now

Thanks again.


I'm glad you found a solution. I would have never guessed the
LinkChildFields and LinkMasterFields since I have never used them. The
environment I'm in makes for regular compacting so I can get away with
the possible extra mdb bloat caused by changing the RecordSource of the
subform dynamically.

James A. Fortune

Nov 13 '05 #10

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

Similar topics

3
by: CLarkou | last post by:
On a client's machine with Office 97, my access program gives an error "The Expression you entered refers to an object that is closed or doesn't exist" when I am assigning a value in the checkbox....
3
by: Annelies | last post by:
Hi, I want to set the recordsource of a subform to a query with this syntax : Forms!Form_patient!sub75.form.recordsource="MyQueryName" the problem is after typing sub75. I get a list of...
4
by: Gianluca L. Monteleone | last post by:
Hi Folks! I have this strange error that happens after conversion from A97 to AXP (2000-Format). Looks like a bug to me - I've lost 3 days with no result. I use a form with 2 subforms on it,...
1
by: Johnny Meredith | last post by:
I have an unbound main form (one side) with a subform (many side). The main form has a textbox control on it whose visible property is set to false. It's controlsource property is a reference to...
5
by: (PeteCresswell) | last post by:
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.Name subDeal ...
0
by: swatijogdand | last post by:
Hi , I have assigned one query as a recordsource to a subform.But, if the form is abruptly closed down, next time it gives a 2467 error at load of the form.... is thr ne solution for this ? ...
2
by: qianiqan | last post by:
We have three forms: Main form, SearchForm and its subform SubFormS. Click the button cmdA in MainForm will open the SearchForm. The Search form has a subform SubFormS. The Access database has two...
1
by: sumit205 | last post by:
Error 2467:The Expression you entered refers to an object that is closed or doesn't exist . DoCmd.OpenForm frm2, WindowMode:=acDialog, OpenArgs:="c" & NewProductID In the debig mode when i...
8
by: fuze | last post by:
I currently have a form with a couple text boxes, a button, and an unbound subform. Pressing the button will assemble a SQL string using whatever is in the textboxes and assign the SQL string to the...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
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
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

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.