Update Y/N check box for all like records

  • Thread starter Thread starter Stacey Crowhurst
  • Start date Start date
S

Stacey Crowhurst

Hi. I have a tblProjects that contains lots of information about each of our
construction projects. It is generally text fields, status comments, budget
comments, obstacles, etc. The primary key is an autonumber field. Lastly, I
have a sequence field that allows me to keep a moving history. Sequence 0
for the first entry for project XXX01-01. Sequence 1 for the next entry on
project XXX01-01.

There is a Y/N check box in the table to indicate whether the project is
needed for a special monthly report for my boss. The projects needed for
this report change over time as projects are added, put on hold, completed
and etc.

I made a simple form with just a few fields to identify the project and the
Y/N check box. Is there anyway that I can have the checkbox be updated for
all instances of that project number when checked?

Ex: If project CCP09-03 has three records (sequence 0, 1, 2) can I check
the checkbox on CCP09-03 sequence 2, and have the other instances updated as
well? That way all instances for CCP09-03 have the checkbox checked.

Hopefully this makes sense. Thank you for your help!
Stacey
 
Use an update query.
Set criteria so it selects all projects with CCP09-03 and set the checkbox
field to True.
Run the query from a button on the form.
Then requery the form to show the changes.


Jeanette Cunningham MS Access MVP -- Melbourne Victoria Australia
 
Stacey

I'm trying to envision what that checkbox is actually doing for you. Based
on your description, it sounds like the Yes/No answer is for the project
itself, not for the individual sequence records.

Wouldn't a single Yes/No field in the project table (*and a single yes/no
checkbox on the project's form) be sufficient? After all, if checking one
means checking all, why bother?!

More info, please...

Regards

Jeff Boyce
Microsoft Access MVP

--
Disclaimer: This author may have received products and services mentioned
in this post. Mention and/or description of a product or service herein
does not constitute endorsement thereof.

Any code or pseudocode included in this post is offered "as is", with no
guarantee as to suitability.

You can thank the FTC of the USA for making this disclaimer
possible/necessary.
 
Back
Top