I have a form based on query based on a table called allocations. On the form there is a combo box for contract number. What i am trying to do is find the contract in the contracts table based on the contract number selected from the combo box and then update a field in the contract table with a value from the form. I am using the code below but i keep getting METHOD OR DATA MEMBER NOT FOUND. any help would be great ...
Dim rstadddelqty As ADODB.Recordset
Dim strCnn As String
On Error GoTo Err_cmdsavealloc_Click
Set rstadddelqty = New ADODB.Recordset
rstadddelqty.Open "Select * From Contract", CurrentProject.Connection, adOpenKeyset, adLockOptimistic
rstadddelqty.findfirst "[contractnumber]= " & Me![cbopurchase]
rstadddelqty.Fields("DeliveredQty") = Me.QuantityKilos
Dim rstadddelqty As ADODB.Recordset
Dim strCnn As String
On Error GoTo Err_cmdsavealloc_Click
Set rstadddelqty = New ADODB.Recordset
rstadddelqty.Open "Select * From Contract", CurrentProject.Connection, adOpenKeyset, adLockOptimistic
rstadddelqty.findfirst "[contractnumber]= " & Me![cbopurchase]
rstadddelqty.Fields("DeliveredQty") = Me.QuantityKilos