Results 1 to 8 of 8
  1. #1
    alexc333 is offline Advanced Beginner
    Windows 7 32bit Access 2010 32bit
    Join Date
    Jul 2011
    Posts
    38

    Deleting a record


    Hi All,

    I have a query set up but I don't want all of the content within the query. However, if I delete a record from the query it also deletes it from the table. How can I just delete it from the query?

    Cheers

    Alex

  2. #2
    khalid's Avatar
    khalid is offline MS-Access Developer
    Windows 7 64bit Access 2010 64bit
    Join Date
    Mar 2010
    Location
    Kuwait
    Posts
    244
    Hi Alex

    Queries are nothing but recordsets from tables, If your query is based on the table, and if you delete a record from it, it would definately delete those records from the table.

    What you want to delete? and why?

  3. #3
    alexc333 is offline Advanced Beginner
    Windows 7 32bit Access 2010 32bit
    Join Date
    Jul 2011
    Posts
    38
    Thanks for the reply khalid. For example on my query I have a list of all Cancer publications. However, some of them are not suitable as they might relate to childrens cancer, so I need to subtract them from the query.

    How would I take out these records without deleting them tottaly?

  4. #4
    khalid's Avatar
    khalid is offline MS-Access Developer
    Windows 7 64bit Access 2010 64bit
    Join Date
    Mar 2010
    Location
    Kuwait
    Posts
    244
    You can just select those records from table which are required and do your calculation etc.

    You can SELECT your desired records for analysis using WHERE clause in the SELECT Statement.

    SELECT field1, field2, field3, ...
    From YourTable
    Where [field1] = [YourCriteria]

    field1 will be your desired field which you want to Filter for your analysis.

    Hope this make sence

  5. #5
    alexc333 is offline Advanced Beginner
    Windows 7 32bit Access 2010 32bit
    Join Date
    Jul 2011
    Posts
    38
    Too complex for me. I think I will create new fields as this will make the db better in the long term as well.


    Thank You for your help.

  6. #6
    khalid's Avatar
    khalid is offline MS-Access Developer
    Windows 7 64bit Access 2010 64bit
    Join Date
    Mar 2010
    Location
    Kuwait
    Posts
    244
    What query you are using for deleting your records?
    can you copy and paste your query here by just select the SQL of your query from the QBE (query by example) grid?

  7. #7
    khalid's Avatar
    khalid is offline MS-Access Developer
    Windows 7 64bit Access 2010 64bit
    Join Date
    Mar 2010
    Location
    Kuwait
    Posts
    244
    is the problem solved?

  8. #8
    alexc333 is offline Advanced Beginner
    Windows 7 32bit Access 2010 32bit
    Join Date
    Jul 2011
    Posts
    38
    Oops I thought I mark it as solved, done now

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. Problem deleting record
    By Vikki in forum Access
    Replies: 8
    Last Post: 02-26-2010, 11:07 AM
  3. Replies: 0
    Last Post: 09-01-2009, 12:33 PM
  4. Error when deleting a record
    By access in forum Forms
    Replies: 5
    Last Post: 06-15-2009, 12:33 PM
  5. Deleting Record Contents, not complete record...
    By Charles Waters in forum Access
    Replies: 2
    Last Post: 06-24-2008, 12:00 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