+ Reply to Thread
Results 1 to 2 of 2

Checking for multiple duplicates on save_click

  1. #1
    Registered User
    Join Date
    07-10-2018
    Location
    Kent, England
    MS-Off Ver
    Professional Pus 2016
    Posts
    1

    Checking for multiple duplicates on save_click

    Hello

    I am new to VBA but have had some success creating a user form that enters data into a table on clicking save. What I am struggling with is checking for duplicates and adding a pop up when there are duplicates. I have found some good info on how to do this but not on how to check multiple cells for each record, as I have first name and surname in adjcacent columns and need to check both. I envisage the process to be;

    On user clicking save;
    Check columns A and B for duplicates within table
    If BOTH are duplicated, display message box "this user already exists, do you still wish to save"
    If clicks yes, saves record as normal
    If no, clears form

    This is my existing code for the form when save is clicked (I need to check both Name1TEXT and Name2TEXT for duplicates and only return message box if both are duplicated within the same record. In other words, i'm checking for the full name already existing in my table.

    Please Login or Register  to view this content.
    Any help would be very much appreciated

  2. #2
    Forum Guru
    Join Date
    07-25-2011
    Location
    Florida
    MS-Off Ver
    Excel 2003
    Posts
    9,643

    Re: Checking for multiple duplicates on save_click

    Try something like this...

    Please Login or Register  to view this content.
    Surround your VBA code with CODE tags e.g.;
    [CODE]your VBA code here[/CODE]
    The # button in the forum editor will apply CODE tags around your selected text.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] Finding specific cell values within multiple worksheets and checking for duplicates
    By adamheon in forum Excel Programming / VBA / Macros
    Replies: 18
    Last Post: 04-04-2018, 08:46 AM
  2. [SOLVED] Checking for Duplicates
    By s2jrchoi in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 03-26-2013, 09:31 AM
  3. Checking for duplicates
    By Rwilliams_09 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 12-11-2012, 07:10 PM
  4. checking for duplicates
    By dan2010 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 11-04-2010, 04:04 AM
  5. Checking for duplicates
    By adam2308 in forum Excel General
    Replies: 7
    Last Post: 10-15-2009, 07:27 PM
  6. checking for duplicates
    By David Obeid in forum Excel General
    Replies: 1
    Last Post: 06-13-2007, 06:07 PM
  7. Replies: 9
    Last Post: 02-27-2006, 05:35 PM

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