title: Appending Record from Form to Table with VB
body: <p>I've read a few Q&amp;A's regarding this and I think I understand it however in true amature style I think I'm missing something here. </p>
  
  <p>What I'm trying to do is to display one record at a time in a form from table 'A' and give the user an option of pressing a button so they can append the currently viewed record to Table 'B' using the VB code below. however when I press the button nothing happens, could somebody please help me clarify whether I have understood what I have read correctly:</p>
  
  <p>Private Sub Command31_Click()</p>
  
  <pre><code>Dim PartNo, TotalQty, Description, Manufacturer, TotalCost, Category, Warehouse, BinLoc, OrderNum, DateRec, UnitCost, ReturnCode, Batch, bookinsql
  PartNo = Form_LiveQfrm.[PartNo]
  TotalQty = Form_LiveQfrm.[TotalQty]
  Description = Form_LiveQfrm.[Description]
  Manufacturer = Form_LiveQfrm.[Manufacturer]
  TotalCost = Form_LiveQfrm.[TotalCost]
  Category = Form_LiveQfrm.[Category]
  Warehouse = Form_LiveQfrm.[Warehouse]
  BinLoc = Form_LiveQfrm.[BinLoc]
  OrderNum = Form_LiveQfrm.[OrderNum]
  DateRec = Form_LiveQfrm.[DateRec]
  UnitCost = Form_LiveQfrm.[UnitCost]
  ReturnCode = Form_LiveQfrm.[ReturnCode]
  Batch = Form_LiveQfrm.[Batch]
  bookinsql = "INSERT INTO QStore (TextField, NumericField, TextField, TextField, NumericField, TextField, TextField, TextField, TextField, DateField, NumericField, TextField, NumericField ) VALUES ('" &amp; Form_LiveQfrm.PartNo &amp; "', " &amp; Form_LiveQfrm.TotalQty &amp; ", '" &amp; Form_LiveQfrm.Description &amp; "', '" &amp; Form_LiveQfrm.Manufacturer &amp; "', " &amp; Form_LiveQfrm.TotalCost &amp; ", '" &amp; Form_LiveQfrm.Category &amp; "', '" &amp; Form_LiveQfrm.Warehouse &amp; "', '" &amp; Form_LiveQfrm.BinLoc &amp; "', '" &amp; Form_LiveQfrm.OrderNum &amp; "', #" &amp; Form_LiveQfrm.DateRec &amp; "#, " &amp; Form_LiveQfrm.UnitCost &amp; ", '" &amp; Form_LiveQfrm.ReturnCode &amp; "', " &amp; Form_LiveQfrm.Batch &amp; ");"
  
  DoCmd.RunSQL bookinsql
  
  End Sub
  </code></pre>
  
  <p>My LiveQTemp Table is layed out like this:</p>
  
  <pre><code>ID - AutoNumber
  PartNo - Text
  TotalQty - Number
  Description Text
  Manufacturer - Text
  TotalCost - Number
  Category - Text
  Warehouse - Text
  BinLoc - Text
  OrderNum - Text
  DateRec - Date/Time
  UnitCost - Number
  ReturnCode - Text
  Batch - Number
  </code></pre>