Update with checkbox

  • Thread starter Thread starter rob p
  • Start date Start date
R

rob p

I have a subreport with a checkbox, date field and amount field. I made an
update query that does 0, null, null to the three fields. This unchecks all
checkboxes and blanks out the other two fields on all records.

How can I set up the query so it will only run on records with the checkbox
checked. In other words, if I have a record unchecked but with a date and
amount I would NOT want that record affected if I ran the update query. Just
the ones with checked box.

Thanks.
 
Create your update query and set the criteria for [Checkbox] to Yes or True
depending on how you set up the data (Yes/No or True/False). As long as you
have a criteria, this criteria will apply to all fields in the update query.
The update query works on a record basis, so if the record doesn't fit the
criteria, no updates occur. If you wanted to apply updates on a field by
field basis, you would put the criteria in the Update field fo the query.

Kelvin
 
Thanks. works fine.
rob

Kelvin said:
Create your update query and set the criteria for [Checkbox] to Yes or True
depending on how you set up the data (Yes/No or True/False). As long as you
have a criteria, this criteria will apply to all fields in the update query.
The update query works on a record basis, so if the record doesn't fit the
criteria, no updates occur. If you wanted to apply updates on a field by
field basis, you would put the criteria in the Update field fo the query.

Kelvin

rob p said:
I have a subreport with a checkbox, date field and amount field. I made an
update query that does 0, null, null to the three fields. This unchecks all
checkboxes and blanks out the other two fields on all records.

How can I set up the query so it will only run on records with the checkbox
checked. In other words, if I have a record unchecked but with a date and
amount I would NOT want that record affected if I ran the update query. Just
the ones with checked box.

Thanks.
 
Back
Top