Results 1 to 6 of 6
  1. #1
    Perceptus's Avatar
    Perceptus is offline Expert
    Windows 7 64bit Access 2003
    Join Date
    Nov 2012
    Location
    Knoxville, Tennessee
    Posts
    659

    Question Deleting items from Continuous forms

    According MSDN when a user chooses to delete or cut a record, that record is moved into a temporary location and then the user is prompted about whether or not they want the record to be deleted. Can I suppress the temporary move of data to this buffer, like with how it would work in a Microsoft Access Project.

    I would like to copy the data first into another location before the move is made or before delete occurs without having to create a new button etc.

  2. #2
    rpeare is offline VIP
    Windows XP Access 2003
    Join Date
    Jul 2011
    Posts
    5,442
    why copy it, why not just mark it as a voided record and not display it, then you don't have to worry about extra code and it will still be in a location you can get to it in your database (on the same table it always was, just suppressed if the 'void' flag is set.

  3. #3
    Perceptus's Avatar
    Perceptus is offline Expert
    Windows 7 64bit Access 2003
    Join Date
    Nov 2012
    Location
    Knoxville, Tennessee
    Posts
    659
    Adding another field to the table that stores this information would greatly overcomplicate and require recoding of large amounts of code. Which does seem where I this might be headed.

  4. #4
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,622
    Either means database changes. If you want to 'copy to another location', is that a new table? Can trap delete action with BeforeDelConfirm event, although not sure how you can leverage that to do what you describe.

    I agree with rpeare, add a field for record status and modify queries - easier.
    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
    rpeare is offline VIP
    Windows XP Access 2003
    Join Date
    Jul 2011
    Posts
    5,442
    If you want to do what you propose you can do one of a few things

    if you put a 'delete' button on your form or trap the 'delete' key press you would:

    1. Have to copy the 'current' record (assuming this is a bound form) to a secondary table that had the exact same structure as your current one with the exception that the PK field would not be an autonumber it would instead because a long integer in case you have any tables that rely on the primary key of the 'main' table.
    2. confirm (through code likely) that the record had been copied, just to make sure it had happened
    3. delete the 'current' record

    Keep in mind all the data in the secondary table is now pretty much useless because you can't paste it back into your main table if something was deleted by accident.

    Are you sure that's what you want to do? especially on a bound form (which it sounds like you are using)?

  6. #6
    Perceptus's Avatar
    Perceptus is offline Expert
    Windows 7 64bit Access 2003
    Join Date
    Nov 2012
    Location
    Knoxville, Tennessee
    Posts
    659
    The concept of using the button is pretty understood. I had hoped that my wack idea was a possibility. The database that I maintain has code that would appear to have operated previously in the nature of my first post. This code no longer works due to the temporary memory. I had hoped to not need it upgraded. My options are very limited. Thank you for the suggestions.

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

Similar Threads

  1. Viewing Continuous forms
    By scoe in forum Forms
    Replies: 9
    Last Post: 10-04-2013, 01:04 AM
  2. Replies: 1
    Last Post: 08-01-2013, 08:47 AM
  3. Replies: 1
    Last Post: 03-15-2012, 02:21 PM
  4. Replies: 2
    Last Post: 10-16-2009, 02:47 PM
  5. Replies: 3
    Last Post: 09-06-2008, 10:19 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