OK, the reason you've been having errors is you never added checkbox controls to your form.
Step 1) Add check box controls to your FORM (Not subform) Just like Arnel did in his sample. This is done by opening the form in design view, clicking on "Design" at the top, selecting the check box control then clicking on your form where you wish it to be.
Step 2) Open the properties for the control box. Give it a name that makes sense for what you are doing.
step 3) Look at the sample Arnel posted. See which even he is using for each control then use the same type of code. You will have to replace the control name he's using with the ones you provided in Step 2).
Were I in your position, I'd start by adding ONE checkbox control, make sure you do it properly, rename it, then get the code for that check box to work. Once you've figured that part out, you should be able to do the same with the rest.
Just so you understand, the way you have your query set up you will not be able to edit data on the subform.
You also do not have the same definition for your two files. In one, Code is a number. For the other Code is a short text. If you are trying to simply view both together this would prevent you from doing a UNION query.