View Full Version : subforms


R_C_S
03-29-2001, 06:38 AM
Hello all!

Here's the scoop. When I create my new sub forms they are to be used in a one to many context and are to be the pop up variety.

As it is now, when the sub form is opened, one must re-enter the linking field (ie. medical record number). The medical record number is the primary key of the parent table and the linked field of the child table. The relationship is set one to many.

The medical record number is a dispalying field in the sub-form. Why isn't the primary key added automatically to the subform and how do I make this happen?

Is there a carry-over function to be used in VBA or can this be accomplished throught the properties and perhaps a macro or two?

many thanks!
ryan

AlanS
03-29-2001, 06:50 AM
Set the Link Child Fields and Link Parent Fields properties of the subform control, to indicate how the two forms should be coordinated.

llkhoutx
03-29-2001, 12:49 PM
You're mixing apples and oranges. A "popup" by definition is a form, not a subform. A "subform" is a form on a form.

There are no master/child keys for "popups", use a query for the recordsource of your popup, the criteria for which is on your form. Use the expression builder to build the criteria for your popup - have the (first or parent) "form" open when doing this.