Default value

  • Thread starter Thread starter EMILYTAN via AccessMonster.com
  • Start date Start date
E

EMILYTAN via AccessMonster.com

Is there any way to initially put the Available qty = the In qty?
Because I need the available qty to be deducted everytime there is a
transaction?
 
Is there any way to initially put the Available qty = the In qty?
Because I need the available qty to be deducted everytime there is a
transaction?

You can use the AfterUpdate event of the Form to set the default value of the
in qty:

Private Sub Form_AfterUpdate()
Const QUOTE as String = """"
If Not IsNull(Me!txtAvailableQty) Then
Me!txtInQty.DefaultValue = QUOTE & Me!txtAvailableQty & QUOTE
End If
End Sub

John W. Vinson [MVP]
 
I am sorry, I still can't get it.
Initially the quantity available should be the same with the in quantity.
After a button is being clicked, it will automatically deduct the value....
 
I am sorry, I still can't get it.
Initially the quantity available should be the same with the in quantity.
After a button is being clicked, it will automatically deduct the value....

In that case, your table design IS WRONG. You should not be doing arithmatic
in tables.

If you want to go with an incorrect table design, you can set the value of
quantity available to the value in in quantity in the Form's Current event.

John W. Vinson [MVP]
 
Back
Top