3061 Query Error

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
 
B

Brian

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"
 
W

Wayne Morgan

In your query you've named the field Request, in the table you have it
listed as Requested.
 
B

Bob Hughes

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


Top