Results 1 to 7 of 7
  1. #1
    Duncan Pucher is offline Advanced Beginner
    Windows 10 Access 2016
    Join Date
    Jun 2019
    Location
    Bellevue, WA
    Posts
    49

    I added tables to a split Database and when I open and save any query it looses all the records

    I split a database and the queries worked. I later added tables and found that if I open and save an existing query that it can't find any records. I'm not sure what is happening and I am not sure it is related to the process of adding tables. I used the below method to add tables.


    1. Go to the tab labeled "External Data" on the ribbon.
    2. Select "Access." The "Get External Data - Access Database" dialog will be displayed.
    3. Click [Browse]. The "File Open" dialog will be displayed.
    4. Locate the path for your back-end database and select the file. The file name should appear in the text box below.
    5. Click [Open]. You will be returned to the "Get External Data - Access Database" dialog.
    6. On the "Get External Data - Access Database" dialog, click the option titled: "Link to the data source by creating a linked table."
    7. Click [OK].
    8. In the next dialog, select the tables you want to link, then click [OK].




    If I open any query such as "ActiveResidentqry" and change anything then save and reopen, it shows no data. I have to use an old copy of the query to restore it. Could anyone show me what I am doing to make this happen?

    Thank you,




    Attached Files Attached Files

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,772
    What exactly do you change?

    I opened that query. Changed "Donald" to "D", closed, reopened - data is there.

    I see some room numbers have been duplicated in RoomNumbersTbl.
    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
    Duncan Pucher is offline Advanced Beginner
    Windows 10 Access 2016
    Join Date
    Jun 2019
    Location
    Bellevue, WA
    Posts
    49
    June,

    Thanks for looking at the table. I meant to say if you change a field. What I want to do is add the new table "ClinicalCategoriestbl" to the ActiveResidentqry so I can create a new report. When I add an item or make any field change the SQL changes and somehow filters out all records. Can you see what is going on?

    Thanks for pointing out the duplicate rooms. I will delete them.

  4. #4
    June7's Avatar
    June7 is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,772
    Problem is using INNER JOIN on table links. Change links to RIGHT JOIN (show all records from Residenttbl…)
    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.

  5. #5
    Duncan Pucher is offline Advanced Beginner
    Windows 10 Access 2016
    Join Date
    Jun 2019
    Location
    Bellevue, WA
    Posts
    49
    June,

    It worked. Thank you. I don't understand JOINS at this point but plan to learn. I wanted to know if both references to JOINs were changed or only one. It seems to work both ways. Below is the change I made in bold font. Do I change both occurences or only one?

    SELECT Residenttbl.RecNum, Residenttbl.CareReviews_FK, Residenttbl.Lastname, Residenttbl.Firstname, Residenttbl.RoomNum_FK, Residenttbl.AdmitDate, Residenttbl.[100thDateDate], Residenttbl.Physician_FK, Residenttbl.DOB, Residenttbl.Payer_FK, Residenttbl.DiabeticStatus, Residenttbl.SafetyItems, Residenttbl.PrimaryDiagnosis, Residenttbl.PrimaryComorbidities, Residenttbl.MajorSurgicalProcedure, Residenttbl.SCStartDate, Residenttbl.SCEndDate, Residenttbl.SCReason, Residenttbl.ShiftsSC_FK, Residenttbl.ACStartDate, Residenttbl.ACEndDate, Residenttbl.ACReason, Residenttbl.ShiftAC_FK, Residenttbl.ActiveInactive, RoomNumberstbl.Room, Residenttbl.ClinicalCategory_FK
    FROM RoomNumberstbl RIGHT JOIN (ClinicalCategoriestbl RIGHT JOIN Residenttbl ON ClinicalCategoriestbl.ClinicalCategory_PK = Residenttbl.ClinicalCategory_FK) ON RoomNumberstbl.RoomNumber_PK = Residenttbl.RoomNum_FK
    ORDER BY RoomNumberstbl.Room;



  6. #6
    June7's Avatar
    June7 is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,772
    I changed both but if one satisfies, then fine but if you added a third lookup table, issue might recur.
    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.

  7. #7
    Duncan Pucher is offline Advanced Beginner
    Windows 10 Access 2016
    Join Date
    Jun 2019
    Location
    Bellevue, WA
    Posts
    49
    June,

    I appreciate the help. Thank you,

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

Similar Threads

  1. Replies: 11
    Last Post: 02-19-2019, 02:17 PM
  2. Replies: 1
    Last Post: 10-31-2017, 11:31 AM
  3. Make table query type looses data
    By annux3 in forum Access
    Replies: 4
    Last Post: 07-05-2016, 06:26 AM
  4. Replies: 1
    Last Post: 02-16-2013, 11:36 AM
  5. Split Database / Added Security - No Reports now
    By rodeoboy in forum Security
    Replies: 16
    Last Post: 02-11-2011, 10:57 AM

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