I'm trying to use the Execute command in Access VBA code to run a saved update query (that changes some information in a select query) but I keep getting: "Runtime Error 3061 - Too few parameters, expected 3".
The update query has no criteria but the select query that it is editing does have a few criteria that are based on some TempVars. Here is the first criteria the select query uses:
Like IIf([TempVars]![VarAccessLevel] Between 3 And 4,"*",[TempVars]![VarLoginID])
The second criteria used is:
[TempVars]![VarClassBlockChosen]
I'm assuming the TempVars are the 3 parameters it is looking for, but I have no clue how to go about providing them.
Here is the VBA code I have written.
CurrentDb.Execute "qupdMarkAllAsPresent", dbFailOnError
Notably, I started out with Do.Cmd OpenQuery "qupdMarkAllAsPresent"
and it worked fine but after I attempted to switch to the Execute command (to prevent warning messages) it began asking for parameters.