Hi there

recently I received help on how to ensure that a user don't close a form before he/she completes all outstanding entries on a calendar.

That works perfectly, but now the problem is I have to complete all entries up to say the year 2020. I only want the handler to check entries from january 2010 up to the cureent day. Ho can I do that?

The code I have is my time mangement module and looks like this......

Public Sub CloseMyApplication(frm As Form)

Dim MyLabel As Control

For Each MyLabel In frm.Controls
If TypeOf MyLabel Is Label Then
If MyLabel.ForeColor = vbRed Then
MsgBox "Please complete all outstanding entries", , "Message"
Cancel = True
End If

If MyLabel.ForeColor = vbWhite Then
End If
End If

Next MyLabel
End Sub

Hi TheDocterd,

This looks like Visual Basic code. It might pay to ask your question in the Visual Basic 4 / 5/ 6 forum where someone who knows VB can help you. Also, please use code tags when posting snippets of your code for readability.

Good luck and happy programming :)