please help!!!!

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

Guest

i have a form based upon a qry which shows tasks to be done, when the task is
complete the record is deleted form the form. i want to make sure that when
the form is closed the user is made aware if any tasks are not yet completed
and even go as far as being unable to close the programme if all tasks are
not complete.

can anyone help.

thanks, richard
 
richard said:
i have a form based upon a qry which shows tasks to be done, when the task is
complete the record is deleted form the form. i want to make sure that when
the form is closed the user is made aware if any tasks are not yet completed
and even go as far as being unable to close the programme if all tasks are
not complete.


Presumabably you have a field in the tasks table that
indicates that the task completed. If so, then I think you
should be able to remove a completed task from the form's
display by using the form's AfterUpdate event to requery the
form's dataset:
Me.Requery

The form's Unload event can be cancelled if some condition
is not satisfied. Maybe something like:
If Me.Dirty Then Me.Dirty = False 'save changed record
If Me.RecordsetClone.RecordCount > 0 Then
Cancel = True
End If

But that seems rather heavy handed. Maybe the user is
unable to completed a task, but needs to move on to other
things.
 
Back
Top