Results 1 to 5 of 5
  1. #1
    uoghk is offline Competent Performer
    Windows 10 Office 365
    Join Date
    Jan 2022
    Posts
    149

    Linked Table Manager show same records

    The following is a query run on SQL Server, it shows different records and total 204 records.
    Click image for larger version. 

Name:	s1.png 
Views:	12 
Size:	72.5 KB 
ID:	50400
    I use Linked Table Manager to link to the table _QryDispenHistory, it shows 204 records, but they are all the same as below
    Click image for larger version. 

Name:	s2.png 
Views:	12 
Size:	51.1 KB 
ID:	50401
    Actually, I use Linked Table Manager to link other tables from SQL Server, they are all correct.
    How can I fix it?
    Thanks

  2. #2
    Join Date
    Jan 2017
    Location
    Swansea,South Wales,UK
    Posts
    4,940
    Don't keep creating a new post for the same problem. https://www.accessforums.net/showthread.php?t=88275
    Please use # icon on toolbar when posting code snippets.
    Cross Posting: https://www.excelguru.ca/content.php?184
    Debugging Access: https://www.youtube.com/results?sear...bug+access+vba

  3. #3
    Gicu's Avatar
    Gicu is online now VIP
    Windows 10 Access 2013 32bit
    Join Date
    Jul 2015
    Location
    Kelowna, BC, Canada
    Posts
    4,115
    So your problem in the other post might not be caused the code used to set the record source but the actual data from the source table. Is _QryDispenHistory a SQL table or a view? What driver are you using? Paid is the same on all 204 records so I think it might be a view????

    Cheers,
    Vlad Cucinschi
    MS Access Developer
    http://forestbyte.com/

  4. #4
    Join Date
    Jun 2010
    Location
    Belgium
    Posts
    1,044
    For linked tables or views from SQL you need to give a unique combination of fields as primary key for access. For tables the primary key of the table is automatically taken as PK for the linked table. For views, you might need to give the PK combination yourself. If no PK possible, create a procedure in SQL server to retrieve the recorset and link the procedure to Access.

  5. #5
    uoghk is offline Competent Performer
    Windows 10 Office 365
    Join Date
    Jan 2022
    Posts
    149
    Thanks all.
    I create a unique PK in SQL and then re-link it again, it works.

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

Similar Threads

  1. Linked Table Manager
    By CS_10 in forum Access
    Replies: 3
    Last Post: 03-22-2016, 06:02 AM
  2. Replies: 0
    Last Post: 04-04-2012, 12:42 PM
  3. Linked table manager error
    By jim_jim in forum Access
    Replies: 5
    Last Post: 08-25-2010, 08:06 PM
  4. Linked Table Manager Problem
    By tallerthantrees in forum Access
    Replies: 4
    Last Post: 08-17-2009, 03:58 AM
  5. Linked Table Manager
    By driccardi in forum Access
    Replies: 4
    Last Post: 02-15-2006, 11:47 AM

Tags for this Thread

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