Trying to help a friend out

  • Thread starter Thread starter SRussell
  • Start date Start date
S

SRussell

Non Access programmer here asking for a little help :)

I was asked to add another sub form to existing app. I have added the new
tables for it, and I am stuck in populating the fkey back to the main page
that this sub form is on. I know it's going to be easy, but I am at a loss
in getting it to work. The other sub forms all work this way and I can't
seem to find anything on the properties section, nor in the data tables.

So how do you pass the main pages PKey down to the sub form?

TIA

__Stephen
 
Stephen,
Let's say you have a ONE table like Customers realated to a MANY table like Orders, and
those tables are related (One to Many) by a key field like CustID. Your Main form will be
based on Customers, and your sub on Orders.
Use the Parent and Child properties of the subform to indicate that CustID on the Main
relates to CustID on the sub.

Any new record added to Orders will 'automagically' have the CustID value of the Parent
Customer.

--
hth
Al Camp
Candia Computer Consulting - Candia NH
http://home.comcast.net/~cccsolutions
There are 10 types of people in the world.
Those who understand binary, and those who don't.
 
Al Camp said:
Stephen,
Let's say you have a ONE table like Customers realated to a MANY table
like Orders, and those tables are related (One to Many) by a key field
like CustID. Your Main form will be based on Customers, and your sub on
Orders.
Use the Parent and Child properties of the subform to indicate that
CustID on the Main relates to CustID on the sub.

Any new record added to Orders will 'automagically' have the CustID
value of the Parent Customer.

Thanks! Now where do I deal with the parent/child properties for the
subform. I have really been looking and I can't seem to find anything like
that? Is it off of the form properties or another aspect of the form's
property?

TIA

__Stephen
 
Open the Properties box on the form, and click on the subform. If you
go to the All tab, it should be the 3rd property down in the list.
 
ManningFan said:
Open the Properties box on the form, and click on the subform. If you
go to the All tab, it should be the 3rd property down in the list.

Thanks. I'm at work now but I'll look into it.
 
Back
Top