By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
448,881 Members | 1,390 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 448,881 IT Pros & Developers. It's quick & easy.

subform not loaded, error 2467

P: n/a
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

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
Share this Question
Share on Google+
2 Replies

P: n/a
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??


*** Sent via Developersdex ***
Apr 10 '07 #2

P: n/a

Test Reply


*** Sent via Developersdex ***
Apr 10 '07 #3

This discussion thread is closed

Replies have been disabled for this discussion.