MHadden
Programmer
- May 13, 2001
- 105
I currently have a form that opens when I open the database. This form is set to continuous, it has reminders that show up, with a task list of things that haven't been done yet. There is a checkbox & a date field. I need the form to stay open until either the checkbox is ticked, showing that the task is completed, or the date is changed to re-schedule it. The form is based on a query that causes it to only show un finished tasks.
The code I tried on the close button is below:
This works great, if there is only one task to be done, trouble is that when there are more than one tasks open, the form will close when only one is checked, or date is updated. I need all open / un finished projects to have the completed checkbox checked, or date changed. I have tried this with a single form as well & get the same results. I have searched this forum & found a few responses that made sense, but I still haven't been able to correct this problem.
Any help is appreciated!
Thank you - Michael
MichaelHadden@yahoo.com
If you give someone a fish, you have given them a meal. If you teach someone to fish, you have given them MANY meals!
The code I tried on the close button is below:
Code:
Private Sub cmd_Close_Reminders_Click()
On Error GoTo Err_cmd_Close_Reminders_Click
If [Complete] = -1 Or [ExpectedCompletionDate] > Date Then
DoCmd.Close
Else
End If
Exit_cmd_Close_Reminders_Click:
Exit Sub
Err_cmd_Close_Reminders_Click:
MsgBox Err.Description
Resume Exit_cmd_Close_Reminders_Click
End Sub
This works great, if there is only one task to be done, trouble is that when there are more than one tasks open, the form will close when only one is checked, or date is updated. I need all open / un finished projects to have the completed checkbox checked, or date changed. I have tried this with a single form as well & get the same results. I have searched this forum & found a few responses that made sense, but I still haven't been able to correct this problem.
Any help is appreciated!
Thank you - Michael
MichaelHadden@yahoo.com
If you give someone a fish, you have given them a meal. If you teach someone to fish, you have given them MANY meals!