Looking for a way to keep user from deleting SOME records 
Author Message
 Looking for a way to keep user from deleting SOME records

I want to be able to keep a user from deleting a record ( paradox table )
based on a field value of the record.  For example if the record has an x
in the can delete field the user can not use the DBNavigator to delete that
record but I still want them to be able to user the navigator.   I think I
can remove the delete control from the navigator but that makes the app
look funny is there some way I can just not let them delete the record by
trapping say the before delete event?  

I have tried to set the read-only property to true, the only problem with
this is that you have to make the table inactive and then active again and
I loose my current record.  I know I can set a bookmark but there has got
to be an easier way!!!!

Please Help



Wed, 18 Jun 1902 08:00:00 GMT  
 Looking for a way to keep user from deleting SOME records


Quote:
>I want to be able to keep a user from deleting a record ( paradox table )
>based on a field value of the record.  For example if the record has an x
>in the can delete field the user can not use the DBNavigator to delete that
>record but I still want them to be able to user the navigator.   I think I
>can remove the delete control from the navigator but that makes the app
>look funny is there some way I can just not let them delete the record by
>trapping say the before delete event?  

That's exactly the thing to do:

procedure myTableBeforeDelete....
...
   if someCondition then
     abort;
...

/Anders



Wed, 18 Jun 1902 08:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Looking for a way to keep user from deleting a record

2. DBASE: permanently deleting deleted records

3. adding/deleting records from array of records in .dat file

4. help, DB files keep their size even after deletion of records

5. Problems with Adding lines to DbMemo in MsAccess db - BDE keeps shouting errors after several records

6. Help! A table that keeps losing records

7. How to add/delete user to SQL Server from Delphi

8. User can delete c/s db with ISQL

9. 2 ways to refer field in Data Module

10. Wanted: big databases that are corrupted in interesting ways

11. Ways to test the .EXE final program ???

12. Creative ways to hang Windows

 

 
Powered by phpBB® Forum Software