Results 1 to 3 of 3
  1. #1
    2 Star Lounger
    Join Date
    Mar 2005
    Location
    Anderson, Indiana, USA
    Posts
    109
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Adjusted Values (2002 SP3)

    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)

    <table border=1><td>Part</td><td>[b]Start Inv[b]</td><td>Made</td><td>Used</td><td>Balance</td><td>DB Balance</td><td>Where Used</td><td>[b]Match[b]</td><td>AX03A-AK</td><td>301</td><td>100</td><td>168</td><td>233</td><td>233</td><td>AG00A</td><td>TRUE</td><td>XA02A-AK</td><td>413</td><td>0</td><td>168</td><td>245</td><td>245</td><td>AG00A</td><td>TRUE</td><td>XA00A-AK</td><td>206</td><td>220</td><td>168</td><td>258</td><td>426</td><td>AG00A</td><td>FALSE</td></table>

    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.
    Attached Files Attached Files

  2. #2
    2 Star Lounger
    Join Date
    Mar 2005
    Location
    Anderson, Indiana, USA
    Posts
    109
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Adjusted Values (2002 SP3)

    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.

  3. #3
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Adjusted Values (2002 SP3)

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

Posting Permissions

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