pop-up reminders

F

fajita

Would like to use a pop-up reminder at start showing
uncompleted jobs past due date. Here is my code but there
is something wrong can't figure it out. I constantly have
to debug...but don't know how to correct it. I am only
using for items from my table.

Private Sub Form_Load()
'On Load of the switchboard check AI Information table
for any unclosed jobs

Dim intStore As Integer

'Count of open jobs that are past the Due Date
intStore = DCount("Action Item #]","[tblAIInformation]",
[DueDate]<=Now() AND [AI Status] =0 ")

'If count of uncomplete jobs is zero display switchboard
'Else display message box detailing amount of jobs
'and give the user the option as to whether to view these
or not.
If inStore = 0 Then
Exit Sub
Else
If MsgBox ("There are" & intStore & "
unclosed jobs" & _
vbCrLf & vbCrLf & "Would you like to
see these now?",_
vbYesNo, "You Have Past Due Jobs...")
= vbYes Then
DoCmd.Minimize
DoCmd.OpenForm "frmReminders",
acNormal
Else
Exit Sub
End If
End If
End Sub
 
W

Wayne Morgan

You have a few typos in what you posted, I assume you typed it rather than
copy and paste or it wouldn't work at all. Since you are having intermittent
problems, by chance are any of the values you are checking Null? If so, you
may have be having a problem when you run across one of those records.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top