I am trying to set up a way of copying a table on a specific date. I have an if statement that I am testing and I have tried the Form load and the onopen events and it is only running the message box. The code is below. If I can get it working, I will add the email portion of the code. But I cannot get just the copy object to work.
I have put the code in both the load and open events and no copying is being done.
Private Sub Form_Load()
If Me.txtTodaysDate = "2/4/2016" Then
DoCmd.CopyObject , "Jim", acTable, "tblMessages"
MsgBox "The tblMessages table has been copied with the name of tblMessages-1-2-2017" & vbCrLf & _
" and a message has been sent to notify the users of the copied table."
Posted by: firstname.lastname@example.org
|Reply via web post||•||Reply to sender||•||Reply to group||•||Start a New Topic||•||Messages in this topic (1)|