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