Hi all,
So i need to have this module run only on a monday and only once! , so here my code is called from the main database menu, but it gets called everytime to the database is closed and re-opened
Public Function AutoQuery()
If VBA.Weekday(Now(), vbMonday) = 1 Then
DoCmd.SetWarnings False
DoCmd.OpenQuery "Unallocate_1", acViewNormal, acEdit
DoCmd.OpenQuery "Unallocate_2", acViewNormal, acEdit
DoCmd.SetWarnings True
End If
End Function
how would i go about only having the database call it say at 10 am ?
So i need to have this module run only on a monday and only once! , so here my code is called from the main database menu, but it gets called everytime to the database is closed and re-opened
Public Function AutoQuery()
If VBA.Weekday(Now(), vbMonday) = 1 Then
DoCmd.SetWarnings False
DoCmd.OpenQuery "Unallocate_1", acViewNormal, acEdit
DoCmd.OpenQuery "Unallocate_2", acViewNormal, acEdit
DoCmd.SetWarnings True
End If
End Function
how would i go about only having the database call it say at 10 am ?
Last edited: