run time error “3061” : too few parameters, expected 1

余生颓废 提交于 2019-12-02 03:42:47

If you're certain the SELECT statement in your question is the exact statement built by your code, copy that text, create a new query in the Access query designer, switch to SQL View, paste in the copied text and try to run it.

Access will present a parameter input box asking you to supply a value for the parameter. Notice that box includes the "name" of whatever Access thinks is the parameter. That parameter name is something (often a misspelled field name) Access can't find in the VALORES_GENERADORES table. Since it can't find the name, it assumes the name must be a parameter.

THANK YOU, HANSUP, YOUR SUGGESTION SOLVED THE PROBLEM!!!

This is a set of daily databases provided to me by a third party. The database structure and the table fields have not changed in the last years. Furthermome, my program worked fine extracting daily info for almost a year!! Then, at the same time my PC commited suicide, the database designer decided to CHANGE THE NAME OF THE LAST FIELD IN THE TABLE I QUERY. Hi did this wierd thing in the midlle of a month (@#!##!!!). When I checked the field names of the table, I looked at the day 1 database table, which still had the old name!!! So, I thougth my re-installing everything was the culprit.

Now I changed the field name (it was not a misspelling or syntax error) and everything is back to normal again.

Thanks again!!!

Rudy

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!