Miikka said:
Hi,
I'm trying to create tool to save information from linked oracle db with
Access.
I have created query and would like it to run on certain intervals.
How could I do this?
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Use a form (hidden, if you like [Visible = False]) that uses the OnTimer
event and Timer Interval. The timer interval is in milliseconds (1000 =
1 second). Set up the OnTimer event to run the query when the Timer
Interval hits you indicated time. E.g.: Say you want to the query to
run every 30 minutes you'd set the Timer Interval to 1800000 (1000 * 60
* 30). Then have an OnTimer event procedure like this:
Private Sub Form_Timer()
On Error GoTo err_
' Use DAO
CurrentDb.QueryDefs("query name").Execute dbFailOnError
exit_:
Exit Sub
err_:
MsgBox "Error: " & Err.Description
End Sub
Substitute your query name for "query name" in the QueryDefs().
The form must be open continuously for this scheme to work.
--
MGFoster:::mgf00 <at> earthlink <decimal-point> net
Oakland, CA (USA)
-----BEGIN PGP SIGNATURE-----
Version: PGP for Personal Privacy 5.0
Charset: noconv
iQA/AwUBRKGQDoechKqOuFEgEQI65QCfbU2O/2AT++6R4Wh3rzo/VXF6HzEAoM/E
AgGdo9f7JwIlCE9JqkTv7sAs
=2W/4
-----END PGP SIGNATURE-----