Results 1 to 6 of 6
  1. #1
    Join Date
    Jun 2006
    Posts
    7

    Unanswered: Automatic alerting with Access

    Hi.
    I keep a long list of domains in an access file with their expiry dates.
    Without having to open Access, is there a way I can get Access to alert me that a domain is going to expire (say) 1 month before the expiry date.

    I want to do this so that Access either autosends an email to a designated address or shows a popup alert when I start up my PC.
    I don't want to have to start the Access software first.
    Thanks.
    Brian

  2. #2
    Join Date
    Apr 2004
    Location
    outside the rim
    Posts
    1,011
    To read data, make a decision and then perform an action, some sort of software will need to run.

    I suggest making a little VB app that performs your check, set it to run hidden, compile it to an EXE, and place it in your startup folder. VB will let you connect to an MDB file and you won't need to open Access.

    tc

  3. #3
    Join Date
    Sep 2004
    Location
    Virginia, USA
    Posts
    98
    Once you have the solution could you please post it?

    I have a need for an alert function as well.

    Thanks.

    KC

  4. #4
    Join Date
    Feb 2004
    Location
    One Flump in One Place
    Posts
    14,912
    I think the "lightest" solution is probably vbscript. Paste the below into a vbs script and get windows scheduler to run when you log in.
    Code:
        Dim db
        Dim rst
        Dim ws
        Dim strSQL
        Dim dbE
     
        Set dbE = CreateObject("DAO.DBEngine.36")
     
        Set ws = dbE.Workspaces(0)
     
        Set db = ws.OpenDatabase("C:\Test.mdb")
     
        strSQL = "SELECT * FROM Table3 WHERE TheDate BETWEEN Date() AND DATEADD('m', 1, Date())"
     
        Set rst = db.OpenRecordset(strSQL)
     
        If rst.RecordCount > 0 Then
     
            MsgBox "Domains going out of date!"
     
        End If
     
        rst.Close
        Set rst = Nothing
        db.Close
        Set db = Nothing
        ws.Close
        Set ws = Nothing
        Set sbe = Nothing
    HTH
    Testimonial:
    pootle flump
    ur codings are working excelent.

  5. #5
    Join Date
    Feb 2004
    Location
    One Flump in One Place
    Posts
    14,912
    More efficient SQL:
    Code:
    "SELECT TOP 1 TheDate FROM Table3 WHERE TheDate BETWEEN Date() AND DATEADD('m', 1, Date())"
    Testimonial:
    pootle flump
    ur codings are working excelent.

  6. #6
    Join Date
    Feb 2004
    Location
    New Zealand
    Posts
    1,418
    Provided Answers: 7
    What I have done

    I use Scheduled Task To Kick a Msaccess program going

    Then Use the Autoexec macro to Start a Custom Function

    Then do it thing

    Job Done Quit

    Nice tick I do here same as above with the Autoexec to close the database
    but turn on the Autocompact on close Great fo back end database runing in the we hours of the morning.
    Last edited by myle; 06-14-06 at 21:24.
    hope this help

    See clear as mud


    StePhan McKillen
    the aim is store once, not store multiple times
    Remember... Optimize 'til you die!
    Progaming environment:
    Access based on my own environment: DAO3.6/A97/A2000/A2003/A2007/A2010
    VB based on my own environment: vb6 sp5
    ASP based on my own environment: 5.6
    VB-NET based on my own environment started 2007
    SQL-2005 based on my own environment started 2008
    MYLE
    YOUR PASSWORD IS JUST LIKE YOUR TOOTHBRUSH DON'T SHARE IT.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •