Maybe something like this
Code:
Dim dbs As DAO.Database
Dim rst As DAO.Recordset
Set dbs = CurrentDb
Dim intItemCount As Integer
Dim intItemReq As Integer
intItemReq = Me.NameOfControlWithCustomerRequest
Set rst = dbs.OpenRecordset("Items", dbOpenDynaset)
rst.FindFirst "ItemID = " & Me.ItemID
If rst.EOF = False Then
If rst![Qty] >= intItemReq Then 'Go ahead and process the request
intItemCount = rst![Qty]
rst.Edit
rst![Qty] = intItemCount - intItemReq
rst.Update
Else
MsgBox "There are not enough items to fulfill the order"
End If 'rst![Qty] >= intItemReq
End If
rst.Close
Set rst = Nothing
Set dbs = Nothing