Kamis, 04 Februari 2016

[MS_AccessPros] Form Load or On Open question

 

Hello All,


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"

   End If

 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."
  
End Sub


Thank You

Jim Wagner

__._,_.___

Posted by: luvmymelody@yahoo.com
Reply via web post Reply to sender Reply to group Start a New Topic Messages in this topic (1)

.

__,_._,___

Tidak ada komentar:

Poskan Komentar