Hi There,
I was wondering if it's possible to run a query but after a time delay. I want to run 2 make table queries in a database in another department the first will trigger the booting sequence in their database and the second will replace the existing staff table with up to date information. The booting sequence takes approx 2 minutes so it would be after that I would like the second query to start. 1 day a week I want to update the information in their table and if possible I would like this to happen from 1 button. The code below boots the users and replaces the staff table but I need to delete the booting table to allow the users back in which is not working, it said it can't find the object.
Private Sub cmd4_Click()
On Error GoTo cmd4_Err
DoCmd.SetWarnings False
DoCmd.OpenQuery "qrybootprimarycare", acViewNormal, acEdit
DoCmd.OpenQuery "qryprimarycaretable", acViewNormal, acEdit
DoCmd.DeleteObject acTable, "C:\Documents and Settings\Tom\Desktop\tblversionserver"
DoCmd.SetWarnings True
cmd4_Exit:
Exit Sub
cmd4_Err:
MsgBox Error$
Resume cmd4_Exit
End Sub
I was wondering if it's possible to run a query but after a time delay. I want to run 2 make table queries in a database in another department the first will trigger the booting sequence in their database and the second will replace the existing staff table with up to date information. The booting sequence takes approx 2 minutes so it would be after that I would like the second query to start. 1 day a week I want to update the information in their table and if possible I would like this to happen from 1 button. The code below boots the users and replaces the staff table but I need to delete the booting table to allow the users back in which is not working, it said it can't find the object.
Private Sub cmd4_Click()
On Error GoTo cmd4_Err
DoCmd.SetWarnings False
DoCmd.OpenQuery "qrybootprimarycare", acViewNormal, acEdit
DoCmd.OpenQuery "qryprimarycaretable", acViewNormal, acEdit
DoCmd.DeleteObject acTable, "C:\Documents and Settings\Tom\Desktop\tblversionserver"
DoCmd.SetWarnings True
cmd4_Exit:
Exit Sub
cmd4_Err:
MsgBox Error$
Resume cmd4_Exit
End Sub