Access 2013 One record from many with same key

Anonymous
2014-04-30T19:33:12+00:00

So here is the problem: I have an excel file of

records. Among these records are some that belong to the same person,

different data. Because each person is identified with their own Id,

i.e, unique key, I am having an issue placing the data from two or more

records belonging to the same person in a single record for a data

summation.

I eventually, or simultaneously want to include the synthesized record with all other records for a count of data contained within all the records.

Of course, I have imported the records into an Access 2013 table for

manipulation, but I can't create a single record with multiple data from

the multiple records with identical keys.

If anyone has a solution or requires further clarification, I would appreciate help on the project.

Additional information; the table holds fields for all the data.

Microsoft 365 and Office | Access | For home | Windows

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

54 answers

Sort by: Oldest
  1. Anonymous
    2014-05-01T19:29:41+00:00

    but as far as from where from and to, yes - we need to talk

    From... I have an excel of course you know... in fact all 28

    No. I don't know. You have not answered my questions and I cannot see your spreadsheet.

    I have tables in Access of all 28

    I did not suggest that and it is not needed, though if you have copied the data into Access it can certainly be used to fill your normalized tables.

    I have tables I've created with your help

    Now, as far as appending a Query - an explanation would help.

    I was talking about a particular type of query - an APPEND QUERY, which takes data from one place (your spreadsheet or a part of it, or from your 28 Visits tables) and appends (copies new records into the target table)  the data in that source into the new Visits table. If (as repeatedly requested) you show us the current structure (tablenames, fieldnames, spreadsheet screen image) of your data we'll be able to help you create such a query.

    Was this answer helpful?

    0 comments No comments
  2. Anonymous
    2014-05-01T21:47:18+00:00

    John,

    First off let me apologize for not revealing specifics; I'm doing this work for a third party and I don't want to reveal more than necessary when it comes to actual data. However, I think I have things set properly and in such a way that I can share what I have, so that I can complete this task.

    Background: I worked with ACCESS decades ago, but I don't think I ever mastered the outcome.

    I have

    28 Visit tables

    With the following fields:

    FacilityID, PersonID(Key), PersonName, Visits

    1 Facility table

    With the following fields

    FacilityID (Key), Facility, Address, City, State, Zip

    1 Person table

    With the following fields

    PersonID, PersonName

    I presume this is enough to create a report that is functional with each person and the number of visits to each facility (which I will want to sum for each person)

    I hope this is good and valid for our purposes

    Was this answer helpful?

    0 comments No comments
  3. ScottGem 68,840 Reputation points Volunteer Moderator
    2014-05-01T22:12:59+00:00

    Have you tried reading what John and others have been trying to tell you? YOU SHOULD NOT have 28 Visit tables. You have not explained what the difference is between these tables. But I see no reason for 28 of them.

    You can create a dummy of your spreadsheet showing the actual column headings, but with dummy data. We NEED to see what this looks like to be able to give meaningful help.

    If you really want our help, then help us help you.

    Was this answer helpful?

    0 comments No comments
  4. Anonymous
    2014-05-01T22:49:01+00:00

    Your design still has a lot of redundancy. In the 14th Visit table are all the FacilityID's equal to 14? Or how were you intending to relate the Facility table to visits?

    You have the PersonName in the Person table - that's good, that's where it should be; but you ALSO have a PersonName in the Visit table. That's redundant and an invitation for trouble; with this design it would be quite possible to have the Person table contain PersonID 123, "Dave Robertson" and one of the Visits table contain PersonID 123, "Laura Buckram". 

    However... before we get your tables properly normalized... is this going to be a database used in an ongoing manner, with more persons, visits and facilities? Or is this a "one shot" problem, just trying to get this desired report out for this specific set of data?

    Was this answer helpful?

    0 comments No comments
  5. Anonymous
    2014-05-01T23:16:48+00:00

    I'm running into a "Duplicate output Destination in FacilityID" error as I attempt to append two or more files to the Visit table.

    I think the Keys are causing conflict (obviously, I lack a basic understanding that I hope to learn here)

    I neglected to mention the Visit table is also created as you can see below.

    28 (differently named) Visit tables,

    With the following fields:

    FacilityID, PersonID(Key), PersonName, Visits

    1 Facility table

    With the following fields

    FacilityID (Key), Facility, Address, City, State, Zip

    1 Person table

    With the following fields

    PersonID, PersonName

    1 Visit table

    With the following fields

    VisitID (Key), FacilityID, PersonID, PersonName, Visits

    Was this answer helpful?

    0 comments No comments