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.
 
Back
Top