Results 1 to 7 of 7
  1. #1
    arronaf is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Nov 2014
    Posts
    2

    Duplicate data on a query

    Hello,



    I am in the process of creating a database to track performance data in four specific areas for work. I have been using YouTube to learn how to setup a database. So far things seem to have gone well. There is a table for the information for each worker (InfoT). Then there is a a table for each performance area, (PriDutT, StanConT, TeamwFollT, and TrainReqsT).

    I can run a query on an individual performance area for a specific person and it returns the data without duplicates. When I run a query for all four areas in a single query I get duplicates of the data. I tried using a four subreports in a single report to pull the working individual queries, but that requires the persons same to be entered four times.

    I am lost on where to look next... I am not sure if it is the way my relationships are setup, an option I have missed that I am not aware of... Any help to a newbie would be greatly appreciated.

    I have attached the database, and tried to be descriptive, if I have missed some piece of information needed, please let me know.

    Thank you in advance for any suggestions!

    TrackerDB working V6.zip

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,771
    Suggest you use a form with a combobox for selection of the employee. Review:

    http://www.datapigtechnologies.com/f...mtoreport.html

    Can use the dynamic parameterized query of each subreport with that technique but I never use dynamic parameterized queries and prefer:

    http://www.allenbrowne.com/ser-62.html

    Either way, bind the main report to InfoT. Apply filter to the main report.
    Set the Master/Child links properties of each subreport container control and the subreports will synchronize with the main report record.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  3. #3
    arronaf is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Nov 2014
    Posts
    2
    June7,
    Thank you for the quick reply and the information. I will review the video and try to see what I can make work.

    Arron

  4. #4
    theyad75 is offline Novice
    Windows 7 64bit Access 2013
    Join Date
    Nov 2014
    Posts
    13
    Click image for larger version. 

Name:	pkandfk.jpg 
Views:	12 
Size:	54.1 KB 
ID:	18905regarding your database the relationship between tables not correct.
    the common field between all tables is [LAST NAME] but last name its not not primary key in table infoT .
    so what u have to do in ur case is change field last name in all tables and replace it with [AIRMENID]



    SO then u have relationship between keys .. see pic

    this is the true relationship between tables (one to many)

    Airmenid primary key in infoT not last name

  5. #5
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,771
    Actually, the tables are correctly related. Despite the use of [Last Name] as the field name, those fields are number type and the true value of those fields is AirmenID.

    Lookups have been built in table for those fields. Building lookups with alias in table is not something I recommend. http://access.mvps.org/access/lookupfields.htm
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  6. #6
    theyad75 is offline Novice
    Windows 7 64bit Access 2013
    Join Date
    Nov 2014
    Posts
    13
    check all queries he want get informations from infoT (first name, rank , shop), so he start making relations between Airmenid and other id's or [last name ] from other tables .n each query from other filed but actualy the realtionship between tables is just between [last name] tell me what u think were is the relation . [last name ] present only himself but actualy Airmenid on behalf to all field in the table infoT

    using Airmenid as forgeinkey in other table is the thing can he do to start get true informations in reports or queries .

    else u can see problems in all the queries in this database .

  7. #7
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,771
    Take another look theyad. The LastName fields are number type. If they were text and actually had the name then they could not link to the AirmenID field in query. They have lookups in table.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

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

Similar Threads

  1. Hiding Duplicate Data in a Query
    By swb1 in forum Queries
    Replies: 12
    Last Post: 06-22-2014, 03:55 PM
  2. Replies: 3
    Last Post: 03-01-2013, 12:41 PM
  3. Replies: 2
    Last Post: 01-23-2013, 04:57 PM
  4. Replies: 1
    Last Post: 04-30-2012, 08:42 AM
  5. query showing duplicate data
    By dan-gauci in forum Queries
    Replies: 2
    Last Post: 10-20-2011, 02:58 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