BrenoAguiar
IS-IT--Management
How can I edit the value of a specific field in a table through an unbound form. I tried something like that but it didn't work:
Dim subm5 As Recordset
Set subm5 = CurrentDb.OpenRecordset("pur_unit", dbOpenDynaset)
With subm5
.FindFirst "location='" & Me.[location] & "'"
If .NoMatch Then
.AddNew
![quantity] = Me.[quantity]
Else
.Edit
End If
.Edit
![quantity] = ![quantity] + Me.[quantity]
.Update
End With
I'm trying to add (or subtract) what the user types in the unbound form quantity field.
Any help?
Dim subm5 As Recordset
Set subm5 = CurrentDb.OpenRecordset("pur_unit", dbOpenDynaset)
With subm5
.FindFirst "location='" & Me.[location] & "'"
If .NoMatch Then
.AddNew
![quantity] = Me.[quantity]
Else
.Edit
End If
.Edit
![quantity] = ![quantity] + Me.[quantity]
.Update
End With
I'm trying to add (or subtract) what the user types in the unbound form quantity field.
Any help?