Gregorys05
Board Regular
- Joined
- Sep 24, 2008
- Messages
- 217
Hi All
I have the below code, when i run it in an access query, it works but when run in VBA i get the following error:
Run Time Error 3061
Too Few Paramaters Expected 1
Any Ideas??
I have the below code, when i run it in an access query, it works but when run in VBA i get the following error:
Run Time Error 3061
Too Few Paramaters Expected 1
Any Ideas??
Code:
Private Sub Replace_Click()
Dim DB As Database
Set DB = CurrentDb()
Dim QDF As QueryDef
Dim SQL As String
Set QDF = DB.CreateQueryDef("", "DELETE tblreplace.*, tblreplace.ReplacePath " & _
"FROM tblreplace WHERE (((tblreplace.ReplacePath)= Forms!Replace!NewImageaddress));")
QDF.Execute
End Sub