Link to sub-form by foreign key

I have a form which links to multiple sub-forms. Some of these sub-forms have multiple entries per master record, and the primary key is an auto-increment. I need my master to link to these sub-forms by a foreign key (the primary key of the master), which would yield 1 or more records. I am doing the link through a button for each of the sub-forms. The Link option on the button provides only the primary key as a link.
So, how do I make these forms (applications) link through the foreign key?
Thanks for any help!!!
Ron

set the foreign key with a global variable as default value, and pass this value when linking

Thank you. I am in the process of building a PhP link.: complicated by the fact that it is a complex key, with two fields.