title: master detail subforms in ms access 2010
body: <p>I have a customers table in an MS Access 2010 database.  I want to create a form with two subforms which together allow the users to select a customer and see more detail about the customer.  </p>
  
  <p>The customers table looks like:  </p>
  
  <pre><code>CustomerID  
  FullName  
  Address  
  City  
  StateProvince  
  Other fields  
  </code></pre>
  
  <p>The mainForm I created in design view by dragging CustomerListForm and CustomerDetailForm onto MainForm.  </p>
  
  <pre><code>CustomerListForm is on left side and lets users filter customers from long list  
    Contains the following controls:  
      txtFilter textbox with embedded macro where = [LastName] Like [Forms]![CustomerListForm]![txtFilter] &amp; "*"  
      FullName textbox and hidden CustomerID textbox which are bound to CustomersTable  
  CustomerDeatilForm located on right, with contents changing based on selection from CustomerListForm  
      If no customer selected from CustomerListForm, show default message  
      Else:  
          Show FullName, address, city, and stateprovince of customer selected from CustomerListForm  
          txtFullName set =[CustomersTable]![FullName], and so on for other fields
  </code></pre>
  
  <p>When I run my CustomerListForm separately, it does successfully allow a user to filter customer records by typing in a name.  But that filtering ability goes away when I embed CustomerListForm in mainForm.  Also, my filtered results in CustomerListForm do not contain any sort of links, which means that CustomerDetailForm does not seem to be able to identify which customer it should be outputting data about.  </p>
  
  <p>Can anyone show me how to set this up?  I think if I get this much running, I will be able to fill in the blanks from other research that I am doing.  </p>
  
  <p>EDIT:  </p>
  
  <p>I see that the FullName textbox on CustomerListForm has an OnClick method.  FullName is not editable in CustomerListForm.  CustomerID is a hidden field alongside each record in CustomerListForm.  I also see that there are multiple hyperlink settings in the format tab of the property sheet for the FullName textbox.  Is there some way that the OnClick method of the FullName textbox can be used to send the CustomerID to CustomerDetailForm?  Perhaps in a hyperlink?  </p>