Error check on a continuous subform

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a continuous subform on a single form. Before a user closes a project
on the single from, I would like to check the subform's status field to
verify that all of the task statuses read as completed. If the task status
is not completed, the project should not be closed and the user should have
the chance to update the task statuses on the subform. How do I error check
the continuous subform from an event on the single form?

Thanks,
Melanie
 
Use a DCount() or DLookup() to find the number of records or a record in the
subform's record source that doesn't have its status set to completed.
DLookup() is probably sufficient since you aren't asking for the number of
records, just that there is one or more. So, while DLookup() will only
return the first record it finds that matches the criteria, one is enough to
show that there is one.
 
Back
Top