Results 1 to 6 of 6

Code not updating the right record, allowing multiple records with same unique ID, HELP!!

Threaded View

  1. #1
    Registered User
    Join Date
    08-06-2012
    Location
    Lisbon, Portugal
    MS-Off Ver
    Excel 2007
    Posts
    5

    Code not updating the right record, allowing multiple records with same unique ID, HELP!!

    I desperately need your help.

    This is an excel wks designed for data entry in sheet "Input", data storage in sheet "PartsData".

    "Order ID" is supposed not to allow duplicates. When a new record is inserted with an existing Order_ID, user is asked if he wants to update existing record.

    BUG? -- As you can see in "PartsData", im starting off with 4 records (order_ID s 10100, 10101, 10102 and 10103). If i try to insert a new record in "Input" wks with Order_ID 10100 but with different values for "Part", "Location" and "Quantity", Excel tells me that that's an existing order_ID and asks if i want to UPDATE the existing record. I say YES.

    RESULT -- Excel does NOT UPDATE the original Order_ID=1100 record, instead it creates ANOTHER Order_ID=1100 record OVERWRITING the previously existing Order_ID=10102 record. I lose one record and get a new record

    Can someone tell me what's wrong? I need this corrected, as i was adapting this code for a work project, and know nothing about VBA... Thank you so much! - Joćo V.
    Attached Files Attached Files

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1