automatic update on a query

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hello:

I've got a very simple update query on my database that changes all "true"
values in a check off box to "false" in a table. What I would like to know is
if there is any way that I can make this query run by itself at 5:00 each day
without the database being opened.
 
Only by using VB / .Net a.n.other programming language that can access Jet
data.


What you could do is have a near empty MDB with a link to the table and a
single AutoExec macro that has a "OpenQuery". The query is then your Update
query. Then, using Windiows "Scheduled Tasks", set up MSaccess.ese to run at
5pm, specifying the MDB.
 
RobertM said:
Hello:

I've got a very simple update query on my database that changes all
"true" values in a check off box to "false" in a table. What I would
like to know is if there is any way that I can make this query run by
itself at 5:00 each day without the database being opened.
Make a vbs file
that open your database and execute the query

Something like that (without testing)
Dim DbEng 'DbEndine DAO 3.6
Dim Db 'Database Dao
Dim Rs 'Recordset Dao
Dim messaggio 'Stringa del Messaggio


Set DbEng = CreateObject("DAO.DBengine.36"­)
Set Db = DbEng.OpenDatabase("C:\Mio.Mdb­")


Set Rs = Db.OpenRecordset("....")


if (not (rs.eof and rs.bof)) then


Rs.MoveFirst
do
messaggio = "Hello world"
Rs.MoveNext
loop until rs.eof


MsgBox messaggio,, "Hello world"
End If


Rs.Close
Db.Close
Set Rs = Nothing
Set Db = Nothing
Set DbEng = Nothing


The appointment is scheduled from windows
J don't know how is called in english, in Italian "operazioni pianificate"

--
_ _
Ciao
MAssimiliano Amendola
Cisa1 - I° Conferenza Italiana per Sviluppatori Access Arezzo 4+5
Giugno 2005 Sono aperte le iscrizioni Info: www.donkarl.com/it
 
Back
Top