Results 1 to 4 of 4
  1. #1
    Jen0dorf is offline Competent Performer
    Windows 7 64bit Access 2013
    Join Date
    Jul 2015
    Location
    UK
    Posts
    453

    Discrepancy in field numbers

    Hi

    thought yesterday I had sorted my first Access project, learned a lot and was pleased everything worked as I want.

    Ran some test searches and the results were to say the least not what I expected in every case.

    Spent the day looking and could find nothing obvious as the search worked sometimes.

    So I went back to the start and looked at the two tables I was given from a really old Database pre XP.

    TWo tables Graves and Memorials both contain a field called Mlink which was used in some compiled way as a link.

    memorials has 17662 records

    Memorial has 17662 Mlink fields

    Graves has 39201 records

    Graves had 18093 Mlink fields

    I obtained these figures by using the code:

    Code:
    SELECT Memorials.MLink, Memorials.Plot, Memorials.GraveNo
    FROM Memorials
    WHERE (((Memorials.MLink) Is Not Null));
    similarly for Graves.

    So this means that there are 431 Mlink entries in the table Graves that I would like to delete as they have no reference to the table memorials

    Using the query wizard I created the query

    Code:
    SELECT Graves.MLink, Graves.Plot, Graves.GraveNo, 
    FROM Graves LEFT JOIN Memorials ON Graves.[MLink] = Memorials.[MLink]
    WHERE (((Memorials.MLink) Is Null));

    Which shows only 278 mlinks in the table Graves that are not in the table memorials

    So I have a discrepancy of 153



    Is my logic at fault? Don't really want to start thinking about deleting until I understand why I have these two different figures.

    Thanks

    Ian

  2. #2
    orange's Avatar
    orange is offline Moderator
    Windows XP Access 2003
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,870
    Ian,

    It may be easier to help you if readers had a copy of the database to work with. We could run some queries and try to make sense of the data. I hate to be negative but it seems to me, you are still trying to sort out what the original database was about. By that I mean some of these "apparent discrepancies" are still showing up as surprises.

  3. #3
    Jen0dorf is offline Competent Performer
    Windows 7 64bit Access 2013
    Join Date
    Jul 2015
    Location
    UK
    Posts
    453
    Hi

    thanks for the input, I thought about posting a copy of the database but it's just to big and if I delete the data then it would be impossible to see the issue.

    As to what the original database was about I originally posted a copy and the answer cam back that it was not a true access database and that without the core programming code I was wasting my time. Hence the re write.

    In terms of functionality the database is to search either by year or Surname and then display the results. In the great scope of databases not a particularly difficult job I suppose. However its importing the 39201 records that has proved to be the most difficult.

    The original tables had no primary keys, No relationships the only thing that linked the two tables was the field Mlink which was not unique and formated as text.

    What I missed was that both tables did not have at least one matching Mlink field.

    Anyway I'll soldier on

    thanks again

    Ian

  4. #4
    orange's Avatar
    orange is offline Moderator
    Windows XP Access 2003
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,870
    Hopefully you have a copy of the original in a safe place.
    And you have made a copy to work with.

    Always make a backup ---it has saved many of us and is a proven practice.
    Work with copies, and back those up as well.

    I am willing and offering help, but we need some facts and some data to work with.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Sorting text field with some numbers
    By lissajo64 in forum Reports
    Replies: 3
    Last Post: 04-28-2015, 08:03 AM
  2. Replies: 2
    Last Post: 01-13-2015, 02:34 PM
  3. Use mid to pull numbers out of another field
    By Amthyst826 in forum Queries
    Replies: 3
    Last Post: 08-19-2014, 09:01 AM
  4. Not Able to Total Field as Numbers
    By majoh60 in forum Queries
    Replies: 5
    Last Post: 04-23-2013, 03:22 PM
  5. Replies: 5
    Last Post: 04-24-2012, 01:56 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums