0

I have a form for users to enter contact (customer) details, and I want to add a separate form to enable users to add phone numbers to the data. They would open the second form by clicking on a button. Contact details are stored in a contact table keyed on contact_id. The telephone numbers are stored in a telephone table keyed on phone_id with a foreign key of contact_id.

I have created the forms, but I cannot see how I can link the form handling phone numbers with its parent, the contact details form. Any insights here would be appreciated.

Steve Cooke
  • 447
  • 1
  • 4
  • 14
  • 1
    Three ways to do this: (1) Create a subform on your main form that will show phone numbers for which ever customer is 'current'; (2) When user clicks button, pass the ID as the 'OpenArgs' parameter of your DoCmd.OpenForm... then use that value to filter that form; (3) save the ID as a global variable, then when form opens grab the ID. – Wayne G. Dunn Feb 17 '14 at 05:32
  • I would generally prefer the WHERE argument to the OpenArgs argument of the OpenForm method ( http://msdn.microsoft.com/en-us/library/office/ff820845.aspx ) – Fionnuala Feb 17 '14 at 13:24

0 Answers0