Results 1 to 7 of 7
  1. #1
    ahmed sami is offline Novice
    Windows 7 32bit Access 2007
    Join Date
    Oct 2014
    Location
    Baghdad Iraq
    Posts
    8

    problem in deleting records of a table via its form

    Hi everyone...I have created a database in access 2007 that contains one main table, this tables is controlled via a form. Via this form, I have put a command
    buttons by which I can open another forms based on another tables. The problem is: The other forms that are opened via the form cannot delete records of there


    tables...whereas the first form has no problem in doing so. Is that because I have many fields in each table? If any one has an idea, please help.

  2. #2
    ranman256's Avatar
    ranman256 is offline VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,525
    You CAN delete records from the form that shows them.
    If you are getting a message about CANNOT DELETE, then your query could be incorrect.
    (unless you have some special locking turned on)

    Another option would be to have a form that is NOT linked to a table , and 1 delete button, and a combo to pick table, and pick criteria.

  3. #3
    alansidman's Avatar
    alansidman is offline VIP
    Windows 7 32bit Access 2010 32bit
    Join Date
    Apr 2010
    Location
    Steamboat Springs
    Posts
    2,529
    It is generally not a good idea to delete records in a database. Rather, add a field to the table and bound form to identify it as archived or some other term you prefer. In your queries and reports, you can then exclude those records that have been "archived." My 2 cents.

  4. #4
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,921
    Are you able to do other edits on those forms?

    Agree with alan - deleting records should be rare event.
    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
    ahmed sami is offline Novice
    Windows 7 32bit Access 2007
    Join Date
    Oct 2014
    Location
    Baghdad Iraq
    Posts
    8
    Thank you for reply...I want to clarify some points:
    1. No message appears that inhibits deleting record. Rather, the records get deleted temporarily, then appear again once I reopened the form.
    2. The objective of the database that may need deleting records, especially in case of wrong entry, or in case of removing a whole record. Ok, I can go on without deleting whole record by removing it field by field, but it is rather tedious process.

  6. #6
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,921
    1. Weird, never seen that and no idea what is happening. Would have to examine db.

    2. I understand wanting to eliminate a bad input (I manage this at data entry, they better be sure they want to save this record) but removing a record that was valid at one point seems dangerous.
    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
    ahmed sami is offline Novice
    Windows 7 32bit Access 2007
    Join Date
    Oct 2014
    Location
    Baghdad Iraq
    Posts
    8
    It is really weird. However I am trying now to get around this problem by finding another way to complete the design. I don't know may be decreasing the number of fields...or by eliminating combos from the other forms.

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

Similar Threads

  1. Replies: 2
    Last Post: 02-23-2014, 09:48 PM
  2. Deleting records on a form using VBA
    By lawdy in forum Programming
    Replies: 5
    Last Post: 05-06-2013, 06:06 PM
  3. Replies: 11
    Last Post: 12-14-2010, 01:25 PM
  4. Replies: 3
    Last Post: 03-25-2010, 12:31 PM
  5. Problem Deleting Records with ADO
    By bdicasa in forum Programming
    Replies: 0
    Last Post: 08-21-2008, 09:27 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