Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Continuous form with subform

23 views
Skip to first unread message

PF

unread,
Jun 6, 2004, 9:44:56 PM6/6/04
to
Hi all,

Is there any way of making a form with a subform in it to
keep continuous? More still, is it possible without VB, as
my knowledge of it is almost null?

Thanks in advance.

PF

Albert D. Kallal

unread,
Jun 7, 2004, 1:27:41 AM6/7/04
to
You can't have a contiues form, and then place inside this a antoher
continue form.

However, you can much achieve the same effivce by:

Make a nice big large blank form.

You then drop in two contiues forms. The contiues form on the left can show
the master data, and the continues form on the right can show the child
data.

There is some ideas here:

http://www.attcanada.net/~kallal.msn/Articles/Grid.htm

So, build 2 grids using continues forms, or 2 forms in data sheet view.

You then create a 3rd "blank" form, and drop in the above 2 forms.

In the master form (which is now a subform), in the on current event, you
place the following command to make the child forms follow this form.

me.Parent.Child1.Requery


In the link child/master settings for child 1, you place:

linkChildFields main_id (whatever is the name of the field in
this sub-form that is used to relate back to the parent table)
LinkMasterFields [MasterForm].[form].[ID]


--
Albert D. Kallal (Access MVP)
Edmonton, Alberta Canada
pleaseNOO...@msn.com
http://www.attcanada.net/~kallal.msn


Joan Wild

unread,
Jun 7, 2004, 9:42:02 AM6/7/04
to
"PF" <anon...@discussions.microsoft.com> wrote in message
news:18bcf01c44c31$092c4060$a301...@phx.gbl...

> Hi all,
>
> Is there any way of making a form with a subform in it to
> keep continuous? More still, is it possible without VB, as
> my knowledge of it is almost null?

You can't have a continuous subform inside a continuous main form, however
you can have two continuous forms (master/child) beside each other on a main
form.

The main form would be unbound; the first subform would be bound to your
master table. Add a textbox to the main form that references the linking
field in the first subform. Name it txtLink and set its control source to
=Me!Subform1!CustomerID
changing the references in the above to reflect
Subform1 - whatever the name of the subform control is
CustomerID - the primary key in your master table

Create a second subform for your child records. Set the link master/link
child properties of the subform control to
Master - txtLink
Child - CustomerID
changing CustomerID to reflect the name of the field in the child table that
is the foreign key to 'CustomerID' in the parent.


--
Joan Wild
Microsoft Access MVP


0 new messages