D
Dan
Good evening.
I am trying to correct some code that errors out while trying to update an
inventory. This code has been copied from a similar dbase. I understand
most of it except where it errors out (UPPERCASE). What is that line
asking me? If think if I understood it, I could probably figure it out.
Thanks for any and all assistance.
Private Sub cmdSignSuppliesIn_Click()
'On Error Resume Next
Dim intQuantity As Integer
'Find amount currently in inventory
intQuantity = DLookup("[Quantity]", "tblInventory", "[SUPPLYTYPEID]=" &
Me.CBOSUPPLYTYPE)
'Increase quanity by amount signed in
intQuantity = intQuantity + CInt(Me.txtQuantityIn)
'Update tblInventory to correct quantity
DoCmd.RunSQL "UPDATE tblInventory SET tblInventory.Quantity =" &
intQuantity & " WHERE tblInventory.InventoryID=" & Me.cboInventoryID
DoCmd.Close acForm, Me.Name
End Sub
I am trying to correct some code that errors out while trying to update an
inventory. This code has been copied from a similar dbase. I understand
most of it except where it errors out (UPPERCASE). What is that line
asking me? If think if I understood it, I could probably figure it out.
Thanks for any and all assistance.
Private Sub cmdSignSuppliesIn_Click()
'On Error Resume Next
Dim intQuantity As Integer
'Find amount currently in inventory
intQuantity = DLookup("[Quantity]", "tblInventory", "[SUPPLYTYPEID]=" &
Me.CBOSUPPLYTYPE)
'Increase quanity by amount signed in
intQuantity = intQuantity + CInt(Me.txtQuantityIn)
'Update tblInventory to correct quantity
DoCmd.RunSQL "UPDATE tblInventory SET tblInventory.Quantity =" &
intQuantity & " WHERE tblInventory.InventoryID=" & Me.cboInventoryID
DoCmd.Close acForm, Me.Name
End Sub