title: Dynamic List Box In A Form
body: <p>This question involves 3 tables and 1 form in my Access database.</p>
  
  <p>The tables are:
  - Contacts
  - Customers
  - Contacts to Customers Relationship</p>
  
  <p>The form is:
  - Manage Contact</p>
  
  <p>What I want. A list box that displays the output of this SQL query:</p>
  
  <p>SELECT Customers.AccountName FROM Customers INNER JOIN [Contacts to Customers Relationship] ON Customers.MasAccountNumber=[Contacts to Customers Relationship].MasAccountNumber WHERE [Contacts to Customers Relationship].ID = 3 ORDER BY Customers.AccountName;</p>
  
  <p>Where you see the "3" in the above SQL statement I would like to have a dynamic value there. Something that references the current records value for the ID column (Contacts table). If I have to do this in a VB script adjusting the list boxes RowSource where would I do that? onLoad for the form doesn't seem to make sense because when someone clicks to change records or add a new record I want it to update for that "Contact" (record).</p>
  
  <p>Any help is appreciated.</p>
  
  <p>TW</p>