From: Michael on
I can't see how to do this. I want to be able to be in form1 and then if I
need to use sub-form1, I want to be able to click on the sub-form button and
the Primary field be autofilled from form1. For instance, Member ID is the
primary key in form1. When I open sub-form1, I want the Member ID to
populate in the sub-form.
From: John W. Vinson on
On Fri, 14 May 2010 17:48:01 -0700, Michael
<Michael(a)discussions.microsoft.com> wrote:

>I can't see how to do this. I want to be able to be in form1 and then if I
>need to use sub-form1, I want to be able to click on the sub-form button and
>the Primary field be autofilled from form1. For instance, Member ID is the
>primary key in form1. When I open sub-form1, I want the Member ID to
>populate in the sub-form.

If it's actually a Subform (a Form displayed within a Subform Control box on
the mainform, with MemberID as the master/child link field) then no button and
no code is needed.

Popping up a separate form can certainly be done, but it takes some code; do
you want to create a new record with this MemberID, or display an existing
record with this MemberID, or what? More details please.
--

John W. Vinson [MVP]