ashleybyrdnc
Registered User.
- Local time
- Yesterday, 21:01
- Joined
- Sep 27, 2006
- Messages
- 17
I am trying to run an append query in access from excel, but i need to turn the warrings off in access so you don't have to say yes through all the warnings. I have tried a bunch of diff things and nothing is working here is where I am right now.
here is my code in excel
Sub UpdateDatabase()
Dim objAcc As Access.Application
Set objAcc = New Access.Application
With objAcc
.OpenCurrentDatabase "\\Clr-database\Sales\Tech Action Items Database\Tech Action Items.mdb"
DoCmd.OpenModule "Jesse1", "Jesse1"
DoCmd.RunCommand acCmdCode
DoCmd.RunCommand acCmdRun
.CloseCurrentDatabase
End With
End Sub
And here is my code in access
Public Sub Jesse1()
With DoCmd
.SetWarnings False
DoCmd.OpenQuery "Update Jesse Ward Completed Tasks"
.SetWarnings True
End With
End Sub
but I am getting a 2501 Runtime error: The comand action was canceled
Please help and if there is another way to do it let me know.
Thanks!
here is my code in excel
Sub UpdateDatabase()
Dim objAcc As Access.Application
Set objAcc = New Access.Application
With objAcc
.OpenCurrentDatabase "\\Clr-database\Sales\Tech Action Items Database\Tech Action Items.mdb"
DoCmd.OpenModule "Jesse1", "Jesse1"
DoCmd.RunCommand acCmdCode
DoCmd.RunCommand acCmdRun
.CloseCurrentDatabase
End With
End Sub
And here is my code in access
Public Sub Jesse1()
With DoCmd
.SetWarnings False
DoCmd.OpenQuery "Update Jesse Ward Completed Tasks"
.SetWarnings True
End With
End Sub
but I am getting a 2501 Runtime error: The comand action was canceled
Please help and if there is another way to do it let me know.
Thanks!