Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Check for computer startup

Posted on 1998-10-13
2
Medium Priority
?
130 Views
Last Modified: 2010-04-30
Is there a way to see if a computer has been started after the first of the month.  I am trying to figure this out to backup data in an Access database.
Thank You
0
Comment
Question by:robhas
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 6

Accepted Solution

by:
clifABB earned 80 total points
ID: 1439641
About the easiest way is to write the date to the registry (using SaveSettings) every time your app starts.  Then compare the date with Now and run your backup utility if the month is different.

Sub Main()
  Dim dtOld As Date

  dtOld = GetSetting("MyApp", "Startup", "OldDate", Now)
  If Month(dtOld) <> Month(Now) Then
    Call BackupDB
  End If
  SaveSetting "MyApp", "Startup", "OldDate", Now
End Sub
0
 

Author Comment

by:robhas
ID: 1439642
Thank You for your help.
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I’ve seen a number of people looking for examples of how to access web services from VB6.  I’ve been using a test harness I built in VB6 (using many resources I found online) that I use for small projects to work out how to communicate with web serv…
Most everyone who has done any programming in VB6 knows that you can do something in code like Debug.Print MyVar and that when the program runs from the IDE, the value of MyVar will be displayed in the Immediate Window. Less well known is Debug.Asse…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Suggested Courses

650 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question