Normal Topic Help to prevent deleting a record (Read 339 times)
esgage
Junior Member
**
Offline


No personal text

Posts: 55
Joined: Dec 8th, 2005
Help to prevent deleting a record
Sep 13th, 2012 at 10:05am
Print Post Print Post  
Hello:

I am in the midst of redesigning my database and one of the problems I have seen is users are still deleting records in error despite the warning the comes up. Since F3 is used to clear a spec in search mode and to delete a record in update mode, they go so fast and think they are still in search mode without reading the screen! I was looking in the book, but did not see anything immediately. Is there a way I could make it so a password would be required to delete a record. Thanks again!

Kevin
ES Gage
  
Back to top
 
IP Logged
 
BOBSCOTT
Senior Member
Members
*****
Offline


That Darn Computer #$X#
{curse words}

Posts: 1195
Joined: Nov 22nd, 2002
Re: Help to prevent deleting a record
Reply #1 - Sep 13th, 2012 at 1:49pm
Print Post Print Post  
Kevin,

look at the NotifyForm() Commands

FormNotifyForm() sets the specified flag on the specified Form.

You can use FormNotifyForm() to set a flag on the form to prevent or allow various actions.

The example below prevents you from deleting a record for the Cities form.

     FormNotifyForm("Cities", 4)

Below is a list of flags.

NotifyForm() sets a flag on the current record to prevent or allow various actions.

0 - Clear all flags
1 - Prohibit saving
2 - Allow save, prohibit record advance
3 - Allow save, prohibit record retreat
4 - Prohibit delete record
5 - Prohibit remove record from results
6 - Disallows the tab the form is on to be closed
7 - Disables Extend Mode
8 - Prohibit toggle between Form and Table View
9 - Disable the form's change flag

You can use one of the Notify commands with other Sbasic to ask your user for a password before allowing delete.

  

Team – Together Everyone Achieves More
Back to top
 
IP Logged