default value in subform

I

Ian

I have a form that launches from another form with an
action button. The main form is client and the sub is
payment. The name of the client and their ID appears on
both but I can't get the payment ID to default to
whatever the client form ID is at. Any idea how?
 
V

Van T. Dinh

Assuming that the ClientID is the PrimaryKey of the tblClient and also the
ForeignKey in the tblPayment, you can set ClientID as the LinkMasterFields
and LinkChildFields of the SubformControl to "link" data entry in the
Payment Subform to the Client current on the Main Form.

Check Access Help on LinkMasterFields and LinkChildFields.
 
I

Ian

sorry - but where do I find the linkmasterfields property
or exactly where do I set it? I found the help section
in the MSDN but can't navigate may way thru the
properties section to set these two fields
 
V

Van T. Dinh

In the DesignView of the (main) Form, select the SubformControl by cliing it
once. The LinkMasterFields and LinkChildField Property should be in the
Data tab of the Properties window.
 
Top