Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3433238
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T07:32:58+00:00 2026-05-18T07:32:58+00:00

In Microsoft Access, I have a query uniSelectedContacts and table possibles. Let’s say in

  • 0

In Microsoft Access, I have a query uniSelectedContacts and table possibles.

Let’s say in possibles I have this:

Smith,John
Dough,John B
Ward,Jane Karon
Eggert,Samantha R 

In uniSelectedContacts I have this:

Smith,John A 1552 1st Ave
Dough,John 1111 2st Ave
Ward,Jane K 2222 3st Ave
Eggert,Samantha Rachel 3333 1st Ave

I want to find where first and last name are identifiable. However, due to variation in middle initial, if there’s no middle initial in possibles, then I want to account for all instances of the first and last name from uniSelectedContacts using INNER JOIN. If possibles has a middle initial(name), regardless of its middle initial or name, I want to account for the record(s) where first and last name of uniSelectedContacts and possibles are identical to each other and also where the first letter of middle initial(name) of uniSelectedContacts matches the first letter of middle initial(name) of possibles. So in the above example, this should be returned:

Smith,John 1552 1st Ave
Dough,John B 1111 2st Ave
Ward,Jane Karon 2222 3st Ave
Eggert,Samantha R 3333 1st Ave

The query below is fast and I want to preserve the speed, but
it will skip all the above records (due to differences in middle initial(name):

SELECT possibles.fullname,
       uniSelectedContacts.addresses,
       uniSelectedContacts.cities,
       uniSelectedContacts.us_states_and_canada,
       uniSelectedContacts.zip_codes INTO PrepareForDuplicateCheck
  FROM uniSelectedContacts INNER JOIN possibles ON uniSelectedContacts.TheName = possibles.fullname;

To try to address the issue above, I have this:

SELECT possibles.fullname,
       uniSelectedContacts.addresses,
       uniSelectedContacts.cities,
       uniSelectedContacts.us_states_and_canada,
       uniSelectedContacts.zip_codes,
       possibles.[firstname] AS Expr1,
       possibles.[lastname] AS Expr2 INTO PrepareForDuplicateCheck
  FROM uniSelectedContacts INNER JOIN possibles ON uniSelectedContacts.TheName = possibles.fullname
  WHERE (((possibles.firstname)=Left([fullname],InStr([fullname],",")-1))
    AND ((possibles.lastname)=Mid([fullname],InStrRev([fullname],",")+1)));

The above gives “Enter Parameter Value possibles.firstname” message. But I’m also not sure if the underlying logic of the query will deliver the results I am expecting.

Thanks for response.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-18T07:32:58+00:00Added an answer on May 18, 2026 at 7:32 am

    It is a little difficult to tell the fields (columns) from the posted samples, but I am assuming that both tables have a full name in the format surnameforename.

    I am not suggesting that this will be fast, but try it.

    SELECT p.aname, 
           u.addresses
           u.addresses, 
           u.cities,
           u.us_states_and_canada,
           u.zip_codes
    INTO PrepareForDuplicateCheck
    FROM (
          SELECT 
             Left([thename],IIf(InStrRev([thename]," ")>0,
               InStrRev([thename]," ")-1,Len([thename]))) As AName, 
             addresses, 
             cities,
             us_states_and_canada,
             zip_codes
          FROM uniSelectedContacts) u
    INNER JOIN (
          SELECT 
             Left([fullname],IIf(InStrRev([fullname]," ")>0,
               InStrRev([fullname]," ")-1,Len([fullname]))) As AName 
          FROM possibles)  AS p 
    ON u.AName = p.AName;
    

    Another possibility:

    SELECT p.aname, 
           u.addresses
    INTO PrepareForDuplicateCheck
    FROM  (
          SELECT 
             Left([fullname],IIf(InStrRev([fullname]," ")>0,
               InStrRev([fullname]," ")-1,Len([fullname]))) As AName 
          FROM possibles) p ,
               uniSelectedContacts u
    WHERE  u.TheName Like p.AName & "*"
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Let's say I have an embedded Excel Spreadsheet on a Microsoft Access form. I
I have created the database in Microsoft Access with this query SELECT * from
I have a very complex Microsoft Access report. This report is run for multiple
Lets say you are designing a sales report in microsoft access. You have 2
I have three tables in Microsoft Access. I have a query that joins the
i am using microsoft access jet sql. i have table col1 and col2 i
I have a query in Microsoft Access, that needs c.a 6 seconds to return
I have a query running in Microsoft Access 2010 and it takes over 30
I have a Microsoft Access database query that I'm trying to import into a
i dont have microsoft access but would like to open an mdb file, is

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.