
Originally Posted by
kableland
Your code ran without error, it just took me to the new query you asked me to create, nothing else. I wanted the SubmitYesNo checkbox of the record on the form to be checked as Yes/True in the query, and I was hoping for the code to do this without the user's involvement/behind the scenes. If this is a little confusing, I would say read my initial post one more time and it should make sense.
The query should be an update query, not a select query. An update query would not show you any results, just updated the fields as intended, without input from the user.
Code should look like;
Code:
UPDATE tbl1HeaderInfo SET tbl1HeaderInfo.SubmitYesNo = True
WHERE (((tbl1HeaderInfo.PRNumTemp)=[Forms]![frmHeaderInfo-Edit]![PRNumTemp]));
note the 'UPDATE' at the begining and not 'Select'
this is pretty much what June7 suggested as well, except this is a saved query, while his was in VBA.
my other two cents:
Avoid using '-' in form, table, or field names. one problem specifically is when you copy and past it in access it wants to change '[frmHeaderInfo-Edit]' to '[frmHeaderInfo]-[Edit]'