one way assuming each record has a unique identifier, at least within the context of the records you are looking at. Since this is a union query you may need an additioanl field to identify which table the record has come from
add a textbox to the form (doesn't matter where because when you are sure everything is working as required it can be hidden). Call the textbox txtSelected
for your checkbox, set the control source to =instr("," & [ID] & ",",[txtSelected] & ",")>0
and in the click event for the checkbox
Code:
if instr("," & [ID] & ",",[txtSelected] & ",")=0 then
'not currently selected, so add to the list
txtSelected="," & Me.[ID] & txtSelected
else
'is currently selected to remove from the list
txtSelected=replace(txtSelected &",","," & Me.[ID] & ",","")
end if
Don't know what you want to do with this information, but if it is to update a table, you can use txtSelected in a query
Code:
dim sql as string
sql="Update some table set somefieid=true where ID in (" & mid(txtSelected,2) & ")"
currentdb.execute sql
union queries have their uses but are often an indication of poor design - for example having separate tables for good in and goods out - they should be in one transactions table.