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

subform not loaded, error 2467

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 version db04 and db09. In the old version
db04 when I click the command cmdA,
it goes first to Form_open of subformS, then goes to the form_open of
the SearchForm. Everything is fine.
In the new version db09 when I click the command cmdA, it goes
directly to Form_open of the Searchform, so form_open of subFormS was
not carried. It causes problems. When it comes to the line
"subformS.Form.RecordSource = "SELECT * FROM ...". An error message
(#2467) showed
that "The expression you entered returns an object that is closed or
does not exist."

The strange thing is that the code for these two forms (SearchForm and
subforms) are exactly the same, why
form_open of subformS does not carried out first?

I would be very grateful if someone could give me some advice. Thanks.

Following are piece of of codes:

'========================================
'Main form
Private Sub cmdA_Click()
DoCmd.OpenForm "frmStatusSearch", acNormal
End Sub

SearchForm
Private Sub Form_Open(Cancel As Integer)
On Error GoTo ErrorForm_Open
subfrmSearchClient.Form.RecordSource = "SELECT * FROM ..."

'...............
End Sub

SubformS in SearchForm
Private Sub Form_Open(Cancel As Integer)
Me.HelpContextId = 10054
End Sub

'==============================================

Feb 7 '07 #1
2 2992
I'm getting a 2467 error using VB Access.
I have a form and subform.

I tried DoCmd.Close acForm, Me.Name
and I tried DoCmd.Close acForm, "frmname"

Any thoughts??

Mikee

*** Sent via Developersdex http://www.developersdex.com ***
Apr 10 '07 #2

Test Reply

Mikee

*** Sent via Developersdex http://www.developersdex.com ***
Apr 10 '07 #3

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...
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...
3
by: JV | last post by:
Hi All, I am new to C# and I am having trouble compiling and running code. I have the code written (it was just an example that I took) and I run it, it gives me No Symbols loaded error as...
3
by: JV | last post by:
Hi All, I am new to C# and I am having trouble compiling and running code. I have the code written (it was just an example that I took) and I run it, it gives me No Symbols loaded error as...
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...
13
by: bitsnbytes64 | last post by:
Hi, I have a form which contains a subform. Both are were creetd using the form wizard and are bound by the column IXO_NR (on two different tables), which is the control source for a textbox on...
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...
57
thelonelyghost
by: thelonelyghost | last post by:
Just searched google and this website but I couldn't come up with an answer to this. Basic Information Software: Microsoft Access 2000 OS: Windows XP Professional SP3 Problem: Error 3008...
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: 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
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...
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...

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.