0

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
Else
End If

If MyLabel.ForeColor = vbWhite Then
JobBook.Show
TimeManage.Hide
End If
End If

Next MyLabel
End Sub

2
Contributors
1
Reply
2
Views
6 Years
Discussion Span
Last Post by darkagn
0

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 :)

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.