Free Lessons
Courses
Seminars
TechHelp
Fast Tips
Templates
Topic Index
Forum
ABCD
 
Home   Courses   TechHelp   Help   Contact   Merch   Join   Order   Logon   Forums   
 
Back to Access Forum    Comments List
Upload Images   @Reply   Bookmark    Link   Email   Next Unseen 
Force shut down
Tony Godfrey 
     
2 years ago
I am getting an error at the line,
ShutdownDateTime = Nz(DLookup("shutdowndatetime", "servert"), #1/1/2100#)
it shows up in yellow.  What am i doing wrong?

here is the subroutine.

DetailsPrivate Sub Form_Timer()

    Dim ShutdownDateTime As Date
    
    Me![CurrentTimeLbl].Caption = Format$(Now(), "dddd, mm/dd/yyyy  h:nn:ss AM/PM")
    
    'Status "Checking for shutdown" & Format(Now(), "hh:nn:ss")
    ShutdownDateTime = Nz(DLookup("shutdowndatetime", "servert"), #1/1/2100#)
    
    If ShutdownDateTime <= Now() Then
            'we may need to shut down, check when the database started
           If TempVars("startuptime") > ShutdownDateTime Then
                'the system started after the last forced shutdown, so we are ok
            Exit Sub
        Else
            'the system started before the shutdown was issued, we need to SHUT DOWN!
        Status "MUST SHUT DOWN!"
        
        DoCmd.OpenForm "ShutDownF"
        
        End If
        
        Else
            'we do not need to shut down, it is scheduled in the future
            
        End If
        
End Sub
Tony Godfrey OP  @Reply  
     
2 years ago

Adam Schwanz  @Reply  
           
2 years ago
That picture is way too small I can't read out what it's saying, looks like a phone picture of the monitor. Can you re-upload an image with a screenshot so we get a good size. Snip & Sketch
Tony Godfrey OP  @Reply  
     
2 years ago
I did take it with my phonr.  I will take a screensho next time it pops up.  it is erratic.  i will keep you posted.

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

Next Unseen

 
 
What's This?

 

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 2026 by Computer Learning Zone, Amicron, and Richard Rost. All Rights Reserved. Current Time: 9/5/2026 2:10:34 PM. PLT: 0s