Results 1 to 5 of 5
  1. #1
    bmazur is offline Novice
    Windows 7 64bit Access 2007
    Join Date
    Nov 2013
    Posts
    3

    compare data entry to current count in inventory

    hi
    I'm developing Inventory Audit. I have a form where user will enter box count for specific barcode. I need to verify if that count is correct. I do have a query that gives me current count for the same barcode, and I have a check box yes/no. Before update I'd like to compare value in my data entry field to a query and update check box to yes if they match.
    here is my query
    SELECT tblBrochureShipments.BrochureShipmentID, tblBrochureMovement.WarehouseID, Sum(tblBrochureMovement.NumberOfBoxes) AS SumOfNumberOfBoxes
    FROM tblWarehouse INNER JOIN (tblBrochureShipments INNER JOIN tblBrochureMovement ON tblBrochureShipments.BrochureShipmentID = tblBrochureMovement.BrochureShipmentID) ON tblWarehouse.WarehouseID = tblBrochureMovement.WarehouseID
    GROUP BY tblBrochureShipments.BrochureShipmentID, tblBrochureMovement.WarehouseID
    HAVING (((tblBrochureShipments.BrochureShipmentID)=[Forms]![frm_Audit]![frm_AuditDetail1].[Form]![BrochureSchipmentID]) AND ((tblBrochureMovement.WarehouseID)=[Forms]![frm_Audit]![WarehouseID]))
    ORDER BY tblBrochureShipments.BrochureShipmentID, tblBrochureMovement.WarehouseID;


    Users populate [frm_AuditDetail1].[Form]![AuditCount]


    And I have AuditMatch (yes/no) that I need to update to yes if [AuditCount] and Sum(tblBrochureMovement.NumberOfBoxes) AS SumOfNumberOfBoxes match.

    thank you in advance
    Barb

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,770
    So you want to show result of that query on form and then user look at both values and click the checkbox if appropriate? or do you want the checkbox automatically checked?

    Don't you need a date/time parameter for the selection of records? On what date was the box count taken? Only transactions up to that point should be included in comparison. Afterall, business doesn't come to a halt just because of an audit.

    The checkbox field may be extraneous. With a timestamp the query count can be calculated and compared to box count whenever needed and the result displayed even if the 'check' is never saved to table. This is appropriate treatment for calculated data (not saving calculated values). And the 'check or no check' is really the result of a calculation.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  3. #3
    bmazur is offline Novice
    Windows 7 64bit Access 2007
    Join Date
    Nov 2013
    Posts
    3
    no, I don't want to show the results to the user. But as soon as user enters data in the record, I want to compare it and update yes to my check mark, so I can then review it. Doing it live allows me not to worry about DateTime stamp.

  4. #4
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,770
    Lack of time stamp and saving the calculated value runs risk of 'disconnect' from the raw data. Will not be able to replicate and substantiate the results. Auditors don't like that.

    However, if you must, then need code in some event. The real trick is figuring out what event. Perhaps textbox AfterUpdate?

    Me.checkbox = Nz(Me.Textbox,0) = Nz(DLookup("SumOfNumberOfBoxes", "queryname"),0)
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  5. #5
    bmazur is offline Novice
    Windows 7 64bit Access 2007
    Join Date
    Nov 2013
    Posts
    3
    thank you. worked like a charm. i know this would not get past auditors, but it won't need to. It's just a small internal thing.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Compare with table coulumn count
    By voro in forum Access
    Replies: 2
    Last Post: 10-26-2012, 08:09 AM
  2. Multiple Inventory Entry
    By DNASok in forum Forms
    Replies: 17
    Last Post: 04-19-2012, 01:42 PM
  3. Calculating Current Stock in Inventory/Warehouse
    By yohansetiawan in forum Access
    Replies: 5
    Last Post: 03-14-2012, 09:05 PM
  4. Replies: 3
    Last Post: 05-19-2010, 10:08 PM
  5. Inventory Entry Update help
    By Richard in forum Access
    Replies: 8
    Last Post: 03-12-2010, 01:32 PM

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