Results 1 to 9 of 9
  1. #1
    Jerry is offline Novice
    Windows 7 64bit Access 2007
    Join Date
    Jan 2011
    Posts
    10

    Query not working after deleting data from table

    I am trying to determine why two of my queries stopped working. I suspect it is due to me manually deleting data from the associated table. Now when I enter new data and run the queries no data is found although the new data is in the associated table. Looking for suggestions as to how to fix the queries.

    Jerry

  2. #2
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 64bit Access 2010 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    Rebuild the queries from scratch and see if you get the same results.

  3. #3
    Jerry is offline Novice
    Windows 7 64bit Access 2007
    Join Date
    Jan 2011
    Posts
    10
    I have rebuilt the query. When I deleted the data it had a cascading effect across many tables and queries, however its only two queries that no longer retrieve data.

    Jerry

  4. #4
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 64bit Access 2010 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    What you say makes sense if the "data deleted" affects the relationship of the tables.

  5. #5
    Jerry is offline Novice
    Windows 7 64bit Access 2007
    Join Date
    Jan 2011
    Posts
    10
    Any suggestions as to where to look as to why the query does not retrieve data?

    The query is to print an invoice and is started from a print button. Everything appears to be working but no data is collected even though the data is in the tables the query looks at.

    Jerry

  6. #6
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 64bit Access 2010 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    There are no records that meet the criteria of the query. You could also be using INNER Joins that return no records if there is no corresponding recoprd in both tables.

  7. #7
    Jerry is offline Novice
    Windows 7 64bit Access 2007
    Join Date
    Jan 2011
    Posts
    10
    It was me not entering all the data in all of the INNER JOIN tables. I will correct this so that data must be entered in these tables.

    Thank you RuralGuy

  8. #8
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 64bit Access 2010 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    If you turn on Referential Integrity (RI) then Access can enforce these relationship rules for you.

  9. #9
    Jerry is offline Novice
    Windows 7 64bit Access 2007
    Join Date
    Jan 2011
    Posts
    10
    Thanks I will do that.

    Jerry

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

Similar Threads

  1. Replies: 11
    Last Post: 12-14-2010, 01:25 PM
  2. Deleting filtered data
    By mylesg in forum Queries
    Replies: 1
    Last Post: 10-23-2010, 07:18 PM
  3. linked table long query not working
    By mirthcyy in forum Queries
    Replies: 4
    Last Post: 09-23-2010, 03:16 PM
  4. Deleting certain data
    By swindmiller in forum Queries
    Replies: 3
    Last Post: 02-17-2010, 10:39 PM
  5. Delete query, deleting customers froma table.
    By keithsrobinson in forum Queries
    Replies: 2
    Last Post: 02-14-2006, 11:33 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