Paolo wrote:
"Rick Brandt" <ri*********@hotmail.com> wrote in message
news:34*************@individual.net... I fail to see the need for this. Your validation should be applied
before a record is allowed to be saved and all of the other rows on
a continuous form have already been saved so why any need to check
them?
This is what the form is for: it reports details of a specific
purchase order against the details of the supplier invoice and the
details of a form that the warehouse needs to fill out manually
(count of physical stock). The data entered has to equal from Qty
Received to Qty Order and Qty Invoiced. The same has to happen for
Cost Order and Cost Invoiced. The form has 3 Variance columns that
compare the details above. When the user click on the "Save" button
this button should check that every variance for each record equals
to 0.00, if it doesn't it gives a warning message and does not allow
the user to save. Unfortunately I can't make the button check every record (or
every
line) it just stops at the one where the cursor is flashing...
I hope I made a little more sense this time....
Thanks again for your help
I still don't fully understand your situation, but I can see where you might be
performing this validation after-the-fact and would need to examine all records.
However; in that scenario you do not want to use the Save event for this and
prevent saving the currenmt record if there is a problem found because the
problem might exist on a different record than the current one. Now the user
needs to fix record 3, but he is stuck on record 4 because you won't let him
save it due to the problems in record 3.
Basically you would need to use the RecordSetClone of the form and then loop
through that testing each record in sequence. Then you could display a message
box when problems are found, but again I think you still have to let the current
record be saved unless the problem found is ON the current record.
--
I don't check the Email account attached
to this message. Send instead to...
RBrandt at Hunter dot com