3061 Query Error

  • Thread starter Thread starter Bob Hughes
  • Start date Start date
B

Bob Hughes

Can any one explain why I get this error?

run-time error 3061
too few parameters. expected 1

Public Sub test()
Dim strSQL As String
strSQL = "UPDATE TblRequest SET Request = true WHERE EmployeeID= 4003"
CurrentDb.Execute strSQL, dbFailOnError
End Sub

My table looks like this

Name Type Size
EmployeeID Long Integer 4
CCID Long Integer 4
DateRequest Date/Time 8
StockNumber Text 50
Quantity Long Integer 4
Requested Yes/No 1
Filled Yes/No 1

If I run this as a seperate query it runs fine

Bob
 
Bob Hughes said:
Can any one explain why I get this error?

run-time error 3061
too few parameters. expected 1

Public Sub test()
Dim strSQL As String
strSQL = "UPDATE TblRequest SET Request = true WHERE EmployeeID= 4003"
CurrentDb.Execute strSQL, dbFailOnError
End Sub

My table looks like this

Name Type Size
EmployeeID Long Integer 4
CCID Long Integer 4
DateRequest Date/Time 8
StockNumber Text 50
Quantity Long Integer 4
Requested Yes/No 1
Filled Yes/No 1

If I run this as a seperate query it runs fine

Bob

There is no field in the table called "Request". There is, however, a field
called "Requested"
 
In your query you've named the field Request, in the table you have it
listed as Requested.
 
In your query you've named the field Request, in the table you have it
listed as Requested.

Thanks Wayne & Brian,

I'm kinda embarrassed over this one.

Bob
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Error 3061 when running update query from code 3
Error 3061 Too few parameters expected 1 - good tested query 4
SQL error 2
Error '3061' 2
Syntax Error 8
error 3061 1
Not In List 6
NotInList Issue 1

Back
Top