title: Binding a form combo box in Access 2007
body: <p>I've created an Access 2007 form that displays, for example, Products from a Product table.  One of the fields in the Product table is a CategoryID that corresponds to this product's parent category.</p>
  
  <p>In the form, the CategoryID needs to be represented as a combo box that is bound to the Category table.  The idea here is pretty straightforward: selecting a new Category should update the CategoryID in the Product table.</p>
  
  <p>The problem I'm running into is that selecting a new Category updates the CategoryName of the Category table instead of updating the CategoryID in the Product table.  The reason for this is that it seems that the combo box must be bound only to the CategoryName of the Category table.</p>
  
  <p>What happens is if the current product has a CategoryID of 12 which is the CategoryName "Chairs" in the Category table then selecting a new value, let's say "Tables" (CategoryID 13) in the combo box updates the CategoryID of 12 with the new CategoryName "Tables" instead of updating the Product table CategoryID to 13.</p>
  
  <p>How can I bind the Category table to a combox box so that the datatextfield (which I wish existed in Access) is the CategoryName and the datavaluefield is the CategoryID and only the CategoryID of the Product will be updated when the selected combo box item is changed?</p>
  
  <p><strong>Edit:</strong> See the accepted answer below.  I also needed to change the column count to 2 and everything started to work perfectly.  </p>