Cory,
Your update query will have to set the value of the Current With
Standards field to 0. I am not sure whether this means all the records
in the table, or if it will only relate to some of the training modules,
but either way it is pretty easy. If the former, the SQL view of the
query will look something like this...
UPDATE YourTable SET [Current with Standards] = 0
You can use an OpenQuery action in your macro to run this update.
As for the Messagebox, it sounds like what you want is to use a macro on
the After Update event of your form, using the MsgBox action. In the
Condition of the macro (select Condition from the View menu if you can't
see a Conditions column in the macro design window), you would put the
equivalent of this...
DCount("*","YourTable","[Current with Standards]=0")>0
By the way, to comment on something that is beyond the scope of your
original question, "for each area there is a table" would normally be
regarded as incorrect database design. You may want to revise this
approach.
--
Steve Schapel, Microsoft Access MVP
Thanks for all of the help so far. Here is an example of what I am doing and
what I am trying to do.
I am creating a Training Databse for several areas throughout our building.
For each area there is a table, forms and various reports. In each table
there are fields such as name, login ID, Training Dates (orientation, etc.)
and a Current with Standards check box. The Current with Standards check box
will allow our trainers to see if everyone who has been trained in a
particular area is up to date with the latest training revisions. I would
like to have an update query so if a new revision to our training comes out
then you can easily run the query and uncheck the "Current" box for every
record in a given table. Since there is a new revision everyone will need
retrained and brought up to speed with the current revisions.
The macro and message box will come into play after the records have been
edited by the update query or manually edited. I would like the message box
to appear on opening the form for editing. As people are retrained the
"current with standards" check box will be checked as proof they are up to
date. Until every record is checked I would like for the message box to
appear stating that 1 or more people or the following records show that not
everyone is up to date with the latest revisions. This message box will be a
constant reminder that retraining is needed. Once everyone is up to date and
all of the check boxes are "true" the message box will no longer appear until
a record is "false".
I hope this makes sense. Any help on this macro or the update query will be
greatly appreciated.