Re: Subform problem
- From: RuralGuy <NoSpam@xxxxxxxxx>
- Date: Tue, 22 Nov 2005 11:16:45 -0700
When forms are used as SubForms on other forms, they do not exist in the Forms
collection as a form. They most be referenced through the Main form.
Here's a bookmarkable URL for you:
http://www.mvps.org/access/forms/frm0031.htm
On Tue, 22 Nov 2005 15:36:02 -0000, "Leslie Isaacs"
<leslie.isaacs@xxxxxxxxxxxxxxxx> wrote:
>
>Hello All
>
>I have a main form called [frm private all] that contains a command button
>that opens another (smaller) form called [frm private companies]. The
>smaller form contains data that is related to the main form (the main form
>contains data about encounters with clients, the smaller form contains the
>client info - e.g. address, phone numbers etc.). New clients are added by
>clicking the button to open the smaller form, adding the new client, then
>closing the smaller form: the OnClose event of the smaller form is
>[Forms]![frm private all]![Combo68company].Requery - [Combo68company]
>contains the client name.
>
>This all works fine, but today I decided it would be better to have the
>smaller form as a subform of the main form, with a button on the main form
>to make the smaller form visible/invisible as required. Having created the
>subform and set its data source as [frm private companies], then linked
>the
>main form to the subform using the corresponding fields on each, I find
>that
>when I close the subform the event procedure [Forms]![frm private
>all]![Combo68company].Requery throws up an error - "Runtime error 2450 -
>Microsofs Access can't find the form 'frm private all' referred to in a
>macro expression or Visual Basic code".
>
>I can't understand this, because that event procedure is requeried fine
>when
>the smaller form is closed as a seperate form, but not when it is closed
>as
>a subform.
>
>Hope someone can help.
>
>Many thanks
>:Les
>
>
_______________________________________________
hth - RuralGuy (RG for short)
Please post to the NewsGroup so all may benefit.
.
- References:
- Subform problem
- From: Leslie Isaacs
- Subform problem
- Prev by Date: Re: Set Warnings
- Next by Date: Re: Multiselect lstbox vs Continuous Sub?
- Previous by thread: Subform problem
- Next by thread: Set Warnings
- Index(es):
Relevant Pages
|