Hi there all
I'm looking for a way to ensure that users don't exit my application before they complete all outstanding calendar entries. It is a job book application we use in office. The thing is that users only complete the day's entry in the calendar, and then leave the rest out.
In my code you will see this, but is there a way to ensure that user first completes all his outstanding entries, before closing the form?Please?
Coding:
Private Sub Form_QueryUnload(Cancel As Integer, UnloadMode As Integer)
If UnloadMode = vbFormControlMenu Then
If TMcnt <> 0 Then
If CDate(TMdata(TMcnt - 1).EDate) < DateValue(Now) - 1 Then
TimeManage.Calendar1.Value = DateValue(CDate(TMdata(TMcnt - 1).EDate)) + 1
Call refresh_tmdata
MsgBox "Please complete outstanding LogBook entries before you can continue", , "Important!"
Cancel = True
Else
TimeManage.Hide
JobBook.Show
End If
Else
TimeManage.Calendar1.Value = DateValue(CDate("2009/06/01"))
Call refresh_tmdata
MsgBox "Please complete outstanding LogBook entries before you can continue", , "Important!"
Cancel = True
End If
End If
End Sub