Free Lessons
Courses
Seminars
TechHelp
Fast Tips
Templates
Topic Index
Forum
ABCD
 
Home   Courses   Index   Templates   Seminars   TechHelp   Forums   Help   Contact   Join   Order   Logon  
 
Home > Forums > Access
Back to Access Forum    Comments List
Pop up Reminders Upload Images   Link   Email  
kami 
Hello!
I am working with access 2003 and I have a table named FrmReminder that has CSJ,Reminder,ExpectedCompletiondate and Completed. I also have a form with the contents of my table. I am trying to create a pop up reminder using the code below but I am getting an error message on the DCount line of the code.  Any ideas what could be wrong?

Private Sub Form_Load()

'On Load of the switchboard check FrmReminder table for any incomplete reminders

Dim intStore As Integer

'Count of Incomplete Reminders that are past the Expected Completion Date
intStore = DCount("[CSJ]", "[FrmReminder]", "[ExpectedCompletionDate] <=Now() AND [Complete] =0")

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


Answer from Richard Rost:

Try this instead:

DCount("[CSJ]", "[FrmReminder]", "[ExpectedCompletionDate] <= #" & Now() & "# AND [Complete] =0")

You need to enclose the VALUE for the current date/time inside of # signs.

This thread is now CLOSED. If you wish to comment, start a NEW discussion in Access Forum.
 

 
 
 

The following is a paid advertisement
Computer Learning Zone is not responsible for any content shown or offers made by these ads.
 

Learn
 
Access - index
Excel - index
Word - index
Windows - index
PowerPoint - index
Photoshop - index
Visual Basic - index
ASP - index
Seminars
More...
Customers
 
Login
My Account
My Courses
Lost Password
Memberships
Student Databases
Change Email
Info
 
Latest News
New Releases
User Forums
Topic Glossary
Tips & Tricks
Search The Site
Code Vault
Collapse Menus
Help
 
Customer Support
Web Site Tour
FAQs
TechHelp
Consulting Services
About
 
Background
Testimonials
Jobs
Affiliate Program
Richard Rost
Free Lessons
Mailing List
PCResale.NET
Order
 
Video Tutorials
Handbooks
Memberships
Learning Connection
Idiot's Guide to Excel
Volume Discounts
Payment Info
Shipping
Terms of Sale
Contact
 
Contact Info
Support Policy
Mailing Address
Phone Number
Fax Number
Course Survey
Email Richard
[email protected]
Blog RSS Feed    YouTube Channel

LinkedIn
Copyright 2024 by Computer Learning Zone, Amicron, and Richard Rost. All Rights Reserved. Current Time: 3/28/2024 8:34:00 AM. PLT: 0s