• Adjusted Values (2002 SP3)

    Author
    Topic
    #443212

    I am having trouble trying to figure out what is happening to the data on a table. The table I have is a product table that stores the quantity on hand. I have code that runs on a form to either add inventory when made or subtract it when used.

    I have been tracking the data in a spread sheet to make sure it matches the table. The column labeled DB Balance is the adjusted amount in the database. The other columns are what I use in the spread sheet. Three times so far an entry on the table has been incorrect; none of them are the same entry either. Twice it did not add in the inventory and once it did not remove it from the table.

    The part I cannot figure out is how the quantity adjusted can be correct on two entries and wrong on the third one when all three of them are adjusted together.

    Example: (one that did not get subtracted)

    Part Start Inv Made Used Balance DB Balance Where Used Match
    AX03A-AK 301 100 168 233 233 AG00A TRUE
    XA02A-AK 413 0 168 245 245 AG00A TRUE
    XA00A-AK 206 220 168 258 426 AG00A FALSE

    All entries were to remove 168 parts from each record on the table, the first two are correct and the last one is wrong. The 168 parts did not get removed.

    I cleared out the table and re-entered all the information that the administrators key in the database. I ran the code step by step for all entries. The second time around it balanced out correctly and did not duplicate the error.

    I am not sure what is causing this. Can the personnel get to the next record faster than it takes for the code to finish looping? Can there be some lag in the network? Is it some bug with-in Access? Or, is there something I could have done different either in my code or the approach I used.

    I just find it strange that on the first two days it all balanced out, then the next few days it did not balance.

    I have attached the code that I use in the form.

    Viewing 0 reply threads
    Author
    Replies
    • #1068875

      I studied this most of the weekend. I finally tracked down on what was going on with the data. There were two mistakes being made. One was the wrong part being keyed. They were using the letter O instead of a 0 (zero). Second, the where used list that I got someone made a mistake on the list.

      If anyone that spent anytime looking into this Thank You.

      • #1068877

        Glad you found the cause of the problem – this would have been impossible for others to guess.

    Viewing 0 reply threads
    Reply To: Adjusted Values (2002 SP3)

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: