title: How to convert data type from Text to Yes/No inside an append query in MS Access?
body: <p>In MS Access, I'm trying to append data from one table (Table A) into another table (Table B). Table A has a column of type 'Short Text' with a single value 'Even' or empty/null. Table B has an equivalent column of type Yes/No. I've to insert data from Table A to Table B, while doing this conversion - if Table A's column has 'Even' set Table B's value to True, otherwise, set it to False. </p>
  
  <p>I've tried a query like the following but it didn't work:</p>
  
  <pre><code>INSERT INTO TableB( BookName, ChapterName, PageNo, Even)
  SELECT name, chapter, page,  IIf(UCase([Even or Odd]) = 'EVEN', True,False)
  FROM TableA;
  </code></pre>
  
  <p>The above query gives me following error:</p>
  
  <p><a href="https://i.stack.imgur.com/tQvho.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/tQvho.png" alt="Access Error"></a></p>
  
  <blockquote>
    <p>Microsoft Access can't append all the records in the append query.
    Microsoft Access set 0 field(s) to Null due to a type conversion failure, and it didn't add 117 record(s) to the table due to key violations....</p>
  </blockquote>
  
  <p>How can I make access change the value while appending the data?</p>