Results 1 to 4 of 4

Thread: How to delete in Database Design

  1. #1
    Join Date
    Dec 2008
    Posts
    112

    How to delete in Database Design

    I have a database with standard record function buttons. However, my 'Delete' button seems to have a problem. I am using a sql statement to search 2 tables and delete a duplicate record. However, before it will delete the record, a message box appears to confirm the deletion requiring the user to answer yes or no. I want to prevent user from deleting record if its status is "Completed" Can anyone tell me how can i achieve this.

  2. #2
    Join Date
    Feb 2008
    Posts
    180

    Re: How to delete in Database Design

    Try putting a breakpoint on your x= line (in the VBA editor click in the grey bar on the left of the editing window) and step through the code to see if something unexpected is happning; Under this role i have given delete permission for users of there own records. But while deleting ,if status of record is "Completed" then it will prevent user from deleting this record.also be sure you don't have SetWarnings set to False somewhere.

  3. #3
    Join Date
    Dec 2008
    Posts
    70

    Re: How to delete in Database Design

    Use the access options which can be programmatically modified to turn off the require confirmation, The button is on a form that shows each record at a time. I originally used the wizard to create the delete button, hence the old coding. However, I did change it to the revised method. Clicking on delete button on DetailView: You need to create a custom view.detail.php which removes the delete button if the status is completed.

  4. #4
    Join Date
    Oct 2008
    Posts
    161

    Re: How to delete in Database Design

    Clicking on delete link at the right side of line on ListView: you need to create a custom view.list.php to use a new template which does not display the delete link if its status is completed; The button works perfectly until I put the code in for the confirmation box which doesn't make any sense as I've done this everywhere else in the database with no problems at all. Try putting a breakpoint on your x= line (in the VBA editor click in the grey bar on the left of the editing window) and step through the code to see if something unexpected is happning; also be sure you don't have SetWarnings .

Similar Threads

  1. Five normal forms in Database Design
    By Gonercase in forum Software Development
    Replies: 6
    Last Post: 01-03-2011, 09:14 AM
  2. Replies: 3
    Last Post: 28-11-2010, 01:13 AM
  3. Need database design process
    By Mrigankasekhar in forum Software Development
    Replies: 5
    Last Post: 03-03-2010, 02:26 AM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Page generated in 1,714,019,975.07394 seconds with 16 queries