If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > PC based Database Applications > Microsoft Access > Automatic alerting with Access

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 06-14-06, 08:32
brian2000 brian2000 is offline
Registered User
 
Join Date: Jun 2006
Posts: 7
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
Reply With Quote
  #2 (permalink)  
Old 06-14-06, 08:55
tcace tcace is offline
Registered User
 
Join Date: Apr 2004
Location: outside the rim
Posts: 968
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
Reply With Quote
  #3 (permalink)  
Old 06-14-06, 09:11
kccpo kccpo is offline
Registered User
 
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
Reply With Quote
  #4 (permalink)  
Old 06-14-06, 09:58
pootle flump pootle flump is offline
King of Understatement
 
Join Date: Feb 2004
Location: One Flump in One Place
Posts: 14,905
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:
Quote:
pootle flump
ur codings are working excelent.
Reply With Quote
  #5 (permalink)  
Old 06-14-06, 10:21
pootle flump pootle flump is offline
King of Understatement
 
Join Date: Feb 2004
Location: One Flump in One Place
Posts: 14,905
More efficient SQL:
Code:
"SELECT TOP 1 TheDate FROM Table3 WHERE TheDate BETWEEN Date() AND DATEADD('m', 1, Date())"
__________________
Testimonial:
Quote:
pootle flump
ur codings are working excelent.
Reply With Quote
  #6 (permalink)  
Old 06-14-06, 20:18
myle myle is offline
(Making Your Life Easy)
 
Join Date: Feb 2004
Location: New Zealand
Posts: 1,143
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.
__________________
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
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

Last edited by myle; 06-14-06 at 20:24.
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On