A subform's form name is not a unique identifier for an open object because
the same suform may be open in multiple forms. YOu can refer to a subform
through the parent form and the name of the subform -control- that contains
the subform, though.
Forms!<parentformname>!<subformctrlname>.Form
If you tell us what you're actually trying to accomplish, we may be able to
give you more helpful information.
On 30 Apr 2005 15:56:31 -0700,
tdmailbox@yahoo.com wrote:
[color=blue]
>I have the statment below that turns off allow edits so thatwhen I run
>the commend acCmdFind I only see the find menu rather then find and
>replace.
>
>The search button is on the parent form, however there is a subform too
>and when I am in the subform this procedure doesnt work.
>
>How can I have modify Me.AllowEdits=false to point to both the parent
>and the subform by name? the parents form name is frm_pe and the
>subforms name is frm_pe_user
>
>
>
> If Me.AllowEdits = True Then
> Me.AllowEdits = False
>
> DoCmd.RunCommand acCmdFind
>
> Me.AllowEdits = True
> Me.Parent.AllowEdits = True
>
> Else
> DoCmd.RunCommand acCmdFind
> End If[/color]