Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Too few Parameters Expected one error message...

Status
Not open for further replies.

rbasram

Programmer
Sep 27, 2001
53
CA
All I am trying to do is selecting the TNum(text), [ServerName] and [documentID] from a query and then passing the values selected by the user in the listboxes and then passing these parameters inside the query to make changes in the [DocumentID] the query result is giving an error message on these lines

sql = "Select [TNum], [Product].[ServerName], [DocumentID] from [Bulletins Query1] where [TNum]= " & lstTNum.Column(Titem) & " and [Product].[ServerName] = '" & lstResult.Column(Ritem) & "';"

Set MyDat = CurrentDb.OpenRecordset(sql)
'Ipdating the documentID bases on the value typed by the user
MyDat.Edit
MyDat.Fields("DocumentID") = Me.[txtDocID]
MyDat.Update

End Sub

The error message is too few parameters Expected 1
Is there any solution to this problem...The values are passed correctly there is no syntax error.
 
Make sure the variables Titem and Ritem return valid index numbers for the listboxes they are calling.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top