Access file converted to Excel - Data not lining up right

Anonymous
2025-06-20T19:25:44+00:00

I have an old Access file that I'm trying to use for research, but I've had to convert it to Excel. The old database was used to track vehicle service by customer. However, I have entries in one table that do not tie to the other table and I can't figure this out. The database was used to track vehicle service by customer.

The first table was for the sale. It contains the VIN, customer name, date of purchase and amount.

The second table was for services provided. It contains the VIN, date of service, milage and amount.

I had been told that the key was the VIN column.

How can I have data on the usage list and not on the sale list once it was exported to Excel? It's been a really long time since I did anything with Access and this just doesn't make sense to me. Please help!

Microsoft 365 and Office | Access | Other | Other

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments
{count} votes

5 answers

Sort by: Most helpful
  1. Tom van Stiphout 39,986 Reputation points MVP Volunteer Moderator
    2025-06-20T19:43:34+00:00

    > I have entries in one table that do not tie to the other table

    Open the database, and go to the Relationships window. Put both tables on the design surface if they are not there already.

    Is there a line between the two, and a 1 and infinity symbol at the ends of the line?

    If yes, the database is correctly designed, and data will line up.

    If no, you are in trouble, and assuming you cannot do data entry to make them line up, you may have to delete the bad data (e.g. Service records referencing a non-existing Customer).

    To find the bad service records, you can run a query along these lines:
    select * from Service where Vin not in (select Vin from Customers)

    0 comments No comments
  2. ScottGem 68,755 Reputation points Volunteer Moderator
    2025-06-20T19:51:24+00:00

    How can I have data on the usage list and not on the sale list once it was exported to Excel? It's been a really long time since I did anything with Access and this just doesn't make sense to me. Please help!

    The answer is poor database design that did not enforce Referential Integrity.

    The SQL Tom suggested will list all Services that don't have a record in the Sales table. You can then back fill the Sales data or delete the orphaned Services data.

    It would also help to know how you exported the data to Excel.

    0 comments No comments
  3. Anonymous
    2025-06-20T20:42:36+00:00

    Thank you both! I think this may be a lost cause.

    First, I went to Data --> Get Data --> From Microsoft Access Database. I then selected all of the items and clicked Load. It stays a blank worksheet, but has Queries and Connections on the right. If I click on Customer Usage, for example, it opens the Power Query Editor and I can see all of the entries there.

    Unfortunately, I've tried to go to Relationships and it keeps freezing Excel.

    0 comments No comments
  4. ScottGem 68,755 Reputation points Volunteer Moderator
    2025-06-20T21:39:43+00:00

    Relationships has nothing to do with Excel.

    What version of Access do you have? The current versions have an External Data tab on the ribbon. To export to Excel you want to export each table separately or make a query that combines the two tables and export that.

    0 comments No comments
  5. Anonymous
    2025-06-21T11:23:25+00:00

    In the Access database execute the following query, changing the table names to your own:

    SELECT *

    FROM Services

    WHERE NOT EXISTS

        (SELECT *

         FROM Sales

         WHERE Sales.VIN = Services.VIN;

    To do this open the query designer in Access and Select SQL from the View dropdown at the left end of the Query Design ribbon.  Paste in the above SQL statement in place of what's there already.  Then click on Datasheet View from the View dropdown.

    This will tell you what rows there are in Services without a matching row on VIN in Sales.

    Assuming that there are mismatches, if you can ascertain which vehicle each mismatched row refers to you can change the VIN for that row in Services to the correct VIN, so that it references a row in Sales.  If there is no row in Sales with the correct VIN, but you know the details of the vehicle and customer, you can insert a new row into Sales with the correct VIN and sale details.  If you are unable to ascertain the VIN and sale details relating to a mismatched row in Services, you will then need to delete such rows from Services.

    Having done the above you will be able to create a relationship on VIN between the two tables.  Ensure that referential integrity is enforced in the relationship.  An unenforced relationship is as much use as a chocolate poker.

    You'll then be able to join the tables on VIN in a query and export the query's result table to Excel.

    0 comments No comments