Trying to open a table find specific record and change the stock but i can not get it to work
table: items
controlS: itemcode and stock
field in main form "itemcodesearch"
here is the code i use:
Dim rstITEMS As Recordset
Set rstITEMS = CurrentDb.OpenRecordset(Name:="ITEMS", Type:=RecordsetTypeEnum.dbOpenDynaset)
With rstITEMS
.FindFirst "[ITEMCODE]= ME.ITEMCODESEARCH"
.Edit
![STOCK] = Me.Text180
.Update
End With
table: items
controlS: itemcode and stock
field in main form "itemcodesearch"
here is the code i use:
Dim rstITEMS As Recordset
Set rstITEMS = CurrentDb.OpenRecordset(Name:="ITEMS", Type:=RecordsetTypeEnum.dbOpenDynaset)
With rstITEMS
.FindFirst "[ITEMCODE]= ME.ITEMCODESEARCH"
.Edit
![STOCK] = Me.Text180
.Update
End With