Go Back   TechArena Community > Software > Software Development
Become a Member!
Forgot your username/password?
Tags Active Topics RSS Search Mark Forums Read

Reply
 
Thread Tools Search this Thread
  #1  
Old 24-09-2009
Member
 
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.
Reply With Quote
  #2  
Old 24-09-2009
Member
 
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.
Reply With Quote
  #3  
Old 24-09-2009
Member
 
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.
Reply With Quote
  #4  
Old 24-09-2009
Member
 
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 .
Reply With Quote
Reply

  TechArena Community > Software > Software Development
Tags: , , ,



Thread Tools Search this Thread
Search this Thread:

Advanced Search


Similar Threads for: "How to delete in Database Design"
Thread Thread Starter Forum Replies Last Post
Five normal forms in Database Design Gonercase Software Development 6 01-03-2011 09:14 AM
error message appears when saving design changes to a database in MS Access Ander K Windows Software 3 28-11-2010 01:13 AM
Need database design process Mrigankasekhar Software Development 5 03-03-2010 02:26 AM


All times are GMT +5.5. The time now is 10:11 AM.