I'm using VBA to pass a parameter to a stored query, but keep getting the error. Here is the stored query:
PARAMETERS Parm1 Long;
UPDATE tJ010_SRP4Codes INNER JOIN tZ100_VendorProfiles
ON tJ010_SRP4Codes.SRP4Code = tZ100_VendorProfiles.JdeSRP4Code
SET tJ010_SRP4Codes.Vendor = 'TEST'
WHERE ((([Parm1]=tZ100_VendorProfiles.VendorID)));
Here is the VBA that calls the query:
Dim Parm1 As Long
db.QueryDefs(!QueryName).Parameters(Parm1) = intVdrProfileID
db.Execute !QueryName, dbFailOnError
I've tried with and without the "Parameters..." line in the stored query. Same error both ways. The stored query works fine on it's own, just not when called from VBA.