Subform on Subform problem

  • Thread starter Thread starter JohnB
  • Start date Start date
J

JohnB

Hi. Ive just discovered that you cant put a subform on
another subform that is set to Continuous Forms view. To
get around this, Ive put a command button on the first
subform that calls up a separate form with the second
subform on it. This works OK, but now the users cant see
the records created in the second subform unless they
click on the command button. There is only likely to be a
maximum of three records created using each call up of the
second subform. ie max three records in each second
subform, for each first subform record.

The only way I can think to show the second subforms
records in the first subform is by creating another
subform, so Im back to the same restriction.

Im happy to keep the command button set up now but is
there a way I could show, in the first subform, a summary
of the records created using the second subform, without
having to create a subform to do it? Ive thought of using
DLookup in a text box, but wont that show only one record?

I hope this all makes sense. Thanks for any help. Cheers,
JohnB
 
John,

There are a number of ways of approaching this.

If the first subform is a datasheet, a second subform can be put in the
detail section, and it will function as you desire when you click the
little [+] datasheet expansion button. However, it is difficult to get
this looking nice!

Another possibility is to put the second subform in the Footer section
of the first subform. At any given time, the second subform will show
the records related to the current record of the first subform.

A third approach is to place both subforms on the main form, possibly
side by side would be good. Then put a hidden unbound textbox on the
main form which references the value of the first subform's primary key
field, and then set the Link Master Fields property of the second
subform to this textbox. Once again, the second subform will show the
records related to the current record of the first subform.
 
Thank you Steve. As always for me on this newsgroup, new
information and new ways to look at database design. My
first subform is not a datasheet, so Ill be looking at
your other suggestions over the next few days. Thanks
again, JohnB
-----Original Message-----
John,

There are a number of ways of approaching this.

If the first subform is a datasheet, a second subform can be put in the
detail section, and it will function as you desire when you click the
little [+] datasheet expansion button. However, it is difficult to get
this looking nice!

Another possibility is to put the second subform in the Footer section
of the first subform. At any given time, the second subform will show
the records related to the current record of the first subform.

A third approach is to place both subforms on the main form, possibly
side by side would be good. Then put a hidden unbound textbox on the
main form which references the value of the first subform's primary key
field, and then set the Link Master Fields property of the second
subform to this textbox. Once again, the second subform will show the
records related to the current record of the first subform.

--
Steve Schapel, Microsoft Access MVP
Hi. Ive just discovered that you cant put a subform on
another subform that is set to Continuous Forms view. To
get around this, Ive put a command button on the first
subform that calls up a separate form with the second
subform on it. This works OK, but now the users cant see
the records created in the second subform unless they
click on the command button. There is only likely to be a
maximum of three records created using each call up of the
second subform. ie max three records in each second
subform, for each first subform record.

The only way I can think to show the second subforms
records in the first subform is by creating another
subform, so Im back to the same restriction.

Im happy to keep the command button set up now but is
there a way I could show, in the first subform, a summary
of the records created using the second subform, without
having to create a subform to do it? Ive thought of using
DLookup in a text box, but wont that show only one record?

I hope this all makes sense. Thanks for any help. Cheers,
JohnB
.
 
Back
Top