Results 1 to 2 of 2
  1. #1
    Join Date
    Mar 2004

    Exclamation Unanswered: Ture Stock Caculation

    I need some help wirting a sum or expression. I want to be able to ahve a stock of tyres but then when a cars comes in I want it to - away from the tyre stock. At the minute I have tried number in stock- Number of tyres.
    If I ahve two cars with the same tyre type they both justtake away from the tyre stock. So if both car had two tyres fitted i would want it to say 6 but instead it says 8 twice. I running is a part a query.

  2. #2
    Join Date
    Feb 2004

    In the form (i assume you have a form for the stock removal) you should have a textbox that shows you what is IN STOCK If you add an unbound textbox and name it something like REMOVESTOCK you can go in to REMOVESTOCK's properties down to AFTER UPDATE and using the build feature go to code builder and enter :-
    Private Sub removestock_AfterUpdate()

    Me!InStock = Me!InStock - Me!Removestock

    Me!Removestock = ""

    End Sub
    INSTOCK = the name of your field but can be what you want

    hope this helps you out


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts