Results 1 to 2 of 2
  1. #1
    burrina's Avatar
    burrina is offline VIP
    Windows 7 64bit Access 2010 64bit
    Join Date
    Oct 2012
    Location
    Freeport,Texas
    Posts
    1,383

    Restrict Double Posting.Not Allow Inventory items to be posted twice?

    I have a subform that runs code to subtract from inventory items sold. The fields are;
    ProductID 'Name of Product
    Quantity 'Quantity of Product
    UnitPrice 'Price of Product
    Discount 'Discount
    Extended Price 'Extended Price with discount applied


    Status 'Default is None and other value is Allocated.


    The code is run off the ProductID

    How can I then prevent a user from posting this amount twice?
    The user can add items and choose to either post them now or later.
    The form is a continuous form.
    It along with subtracting those items from inventory sets the Status to Allocated from None, which is the default.

    What if the user needs to edit the record, what then? I assume some kine of Before Update Event !
    Also, not sure if this helps but Primary Key is named OrderDetailID
    Last edited by burrina; 11-25-2012 at 11:35 PM. Reason: Forgot One Thing

  2. #2
    burrina's Avatar
    burrina is offline VIP
    Windows 7 64bit Access 2010 64bit
    Join Date
    Oct 2012
    Location
    Freeport,Texas
    Posts
    1,383
    I solved the issue: Here is what I did.
    If Me!OrderStatus = "Allocated" Then 'Checks to see if Status of Order has already been set to Allocated, NO Double Inventory issue.
    MsgBox "Order Has Already Been Posted"
    Exit Sub
    End If


    Still have to give some thought to what if user Changes the Record and saves. They don't Post to Inventory but do change the Order Product,Quantity,Price,etc...
    If they don't Post, no error checking is in place.They can save however and the Status will be set to Awaiting Approval.Next dilemma is they delete a record? This will of course NOT adjust Inventory. Unsure of how to handle these things.

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

Similar Threads

  1. How to restrict users?
    By cindytan in forum Access
    Replies: 5
    Last Post: 02-08-2012, 09:40 AM
  2. Replies: 1
    Last Post: 01-19-2012, 03:31 PM
  3. combo box posting to table
    By 237 in forum Access
    Replies: 5
    Last Post: 12-04-2011, 11:36 AM
  4. How to Restrict the Listbox on double click
    By ganeshvenkatram in forum Access
    Replies: 2
    Last Post: 07-07-2011, 10:05 PM
  5. Posting forms on a website
    By nellb13 in forum Forms
    Replies: 0
    Last Post: 06-22-2010, 11:13 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