Access - How to compare two colums in two tables and if they match enter person in other column in both of those

Horacy Piguła 0 Reputation points
2024-01-12T16:02:06.3666667+00:00

Hi so I have imported my Excel file and all Sheets in it into MS Access but I'm struggling to make it work as needed. Have two tables: Main Sheet containing following columns: Person and Company and have 2nd one where I have company and need to compare this filed with the one from Main Sheet and if they match I need the Person to be compied in Another colum in 2 nd Sheet example: in Main Sheet I can Have something like Person Alexa and Company Amazon and in 2nd sheet I need to make it work like: If I compare Company from 2nd Sheet and it matches Company on the list in Main Sheet it will add Alex as the name in new column in 2nd Sheet. How can I do that?

Access
Access
A family of Microsoft relational database management systems designed for ease of use.
317 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Tom van Stiphout 1,701 Reputation points MVP
    2024-01-12T16:19:56.5966667+00:00

    Access is not Excel on steroids. It requires its own relational database model in order to be efficient. Importing Excel files is OK, but then the data needs to be copied to the "real" Access tables. For example a Company table with CompanyID PK, CompanyName text50, uniqueIndex, and a Person table along the same lines, and perhaps an enforced relationship between Company.CompanyID and Person.CompanyID to tie that person to that company in a one-to-many relation.

    0 comments No comments