Re: Subform problem

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



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.
.



Relevant Pages

  • Subform problem
    ... contains the client name. ... subform and set its data source as [frm private companies], ... when I close the subform the event procedure![frm private ...
    (microsoft.public.access.conversion)
  • Subform problem
    ... I have a main form called [frm private all] that contains a command button ... that opens another form called [frm private companies]. ... smaller form as a subform of the main form, with a button on the main form ...
    (microsoft.public.access.forms)
  • Subform problem
    ... I have a main form called [frm private all] that contains a command button ... that opens another form called [frm private companies]. ... smaller form as a subform of the main form, with a button on the main form ...
    (microsoft.public.access.forms)
  • Re: Counting unduplicate data
    ... "Marshall Barton" wrote: ... if a client has come more than once (i.e. more than one subform is ... attendance subform's Link Master Fields property would be: ...
    (microsoft.public.access.reports)
  • Re: Editing data on subform
    ... On the subforms table there is a multi field primary key. ... subform (Client). ... My client field in the client table is indexed: Yes (No Duplicates) ...
    (microsoft.public.access.gettingstarted)