Thread: SQL statement
View Single Post
  #1 (permalink)  
Old 02-26-04, 11:38
Tony McCluney Tony McCluney is offline
Registered User
 
Join Date: Feb 2004
Location: Southeast
Posts: 2
SQL statement

strsql = "UPDATE Shipping SET Shipping.Qty = Qty - 1 " _
& "WHERE (((Shipping.Qty)>0) " _
& "AND ((Shipping.PartNo)= '" & Forms![Axle]![Axle No] & "'"
& "))" _
& ""

dbs.Execute strsql

The above is VB code in an Access2000 application. I need it to update the first record that matches the criteria and no others. It currently updates each record in the Shipping table that matches the Axle No from the form.
Reply With Quote