title: Filling Out Large Number of Fields Efficiently in SQL/VBA
body: <p>I'm working with a table with a large number of fields (40+) in which each record has some fields that need to be filled with "custom" data (based on the results of the program) and the rest need the same "default" values entered repeatedly. I'm writing this program in VBA through MS access. </p>
  
  <p>The actual syntax of creating a new record with field entries is not a problem, but I'm not sure of the best way to enter the most efficient/readable code for all these default entries. Since there's no way to refer to SQL fields using only the column location, I'm thinking the code will quickly turn ugly when referring to each field by a human readable name. </p>
  
  <p>My current code is </p>
  
  <pre><code> DoCmd.RunSQL "INSERT INTO Table1 ([PartNumber],[Description],[Alternate],[Supplier],[Location],[Rev]) values('" &amp; PartNumber &amp; "','" &amp; Description &amp; "'," _
                                  &amp; " '" &amp; Alt &amp; "', '" &amp; Supplier &amp; "', '" &amp; Location &amp; "','" &amp; Rev &amp; "')"
  </code></pre>
  
  <p>So this is going to get ugly with 35+ more values. </p>