Page 2 of 2 FirstFirst 12
Results 16 to 17 of 17
  1. #16
    Join Date
    Oct 2012
    Posts
    8
    Quote Originally Posted by orange View Post
    Thanks for the update. Good luck with your project.
    Hi

    I finished the inventory project successfully which has now capability evaluate all of our fleet vessels inventory on FIFO basis. I am very thankful for your help on this.



    best regards
    TG

  2. #17
    Join Date
    Oct 2012
    Posts
    8
    Quote Originally Posted by Rod View Post
    OK, there were a few things wrong.

    You forgot to include the procedure’s argument, rlngAdjustmentID, both in the procedure’s declaration and in the call to the procedure.

    The procedure declaration should be:
    Code:
    Public Sub AllocateConsumption(rlngAdjustmentID As Long)
    And the call to the procedure:
    Code:
    Mod_AllocateConsumption.AllocateConsumption Me.AdjustmentID
    There are some spelling mistakes – all mine I think, sorry! – but it was difficult without having the actual table definition.

    My procedure tested something called AdjustmentType which does not exist; the correct name is AdjustType.
    Code:
    ElseIf rstSparesAdjusted!AdjustType <> "Consumption" Then
    Similarly SparesID should be SpareID
    Code:
    lngSpareID = rstSparesAdjusted!SpareID
    Code:
    "WHERE SpareID = " & lngSpareID & " AND (QtyAdjusted - Nz(ConsumedQTYfromReceipts,0)) > 0 " & _
    Again QtyAdjust should be QtyAdjusted
    Code:
    lngQtyAvailable = !QtyAdjusted - Nz(!ConsumedQtyfromReceipts, 0)
    The definition of ConsumedQtyfromReceipts has no default value of zero so nulls are possible. There are 5 lines to be changed to include a Nz(,0)
    Code:
    "WHERE SpareID = " & lngSpareID & " AND (QtyAdjusted - Nz(ConsumedQTYfromReceipts,0)) > 0 " & _
    Code:
    lngQtyAvailable = lngQtyAvailable + !QtyAdjusted - Nz(!ConsumedQtyfromReceipts, 0)
    Code:
    lngQtyAvailable = !QtyAdjust - Nz(!ConsumedQtyfromReceipts, 0)
    Code:
    !ConsumedQtyfromReceipts = Nz(!ConsumedQtyfromReceipts, 0) + lngQtyToAllocate
    Code:
    !ConsumedQtyfromReceipts = Nz(!ConsumedQtyfromReceipts, 0) + lngQtyAvailable
    I have made these changes and return the database.

    Attachment 9764

    Two points:

    1. I recommend you always include Option Explicit at the start of every module.
    2. There is no check to determine whether a receipt has already been allocated.
    Hi

    Thanks a lot to you on this info.It could give me lot understanding how I should work on these tables. Thank you very much buddy. Finally, I finished by inventory project now.

Page 2 of 2 FirstFirst 12
Please reply to this thread with any new information or opinions.

Similar Threads

  1. FIFO Inventory
    By Analogkid in forum Access
    Replies: 21
    Last Post: 12-15-2016, 03:35 PM
  2. Tracking values in Access reports in Code
    By dahcjohnson in forum Programming
    Replies: 3
    Last Post: 05-11-2012, 04:43 PM
  3. Inventory tracking with Ms Access (newbie)
    By sanlen in forum Access
    Replies: 5
    Last Post: 02-14-2012, 07:27 AM
  4. FIFO inventory related query - Help!
    By BamaBBQ1 in forum Queries
    Replies: 3
    Last Post: 04-25-2011, 04:20 PM
  5. Inventory with FIFO and multiple bins
    By 16montana in forum Access
    Replies: 1
    Last Post: 08-27-2010, 10:38 AM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums