dbTalk Databases Forums  

disable deleting records in table

comp.databases.ms-access comp.databases.ms-access


Discuss disable deleting records in table in the comp.databases.ms-access forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Filips Benoit
 
Posts: n/a

Default disable deleting records in table - 12-01-2010 , 04:21 AM






Dear All,

Is it possible to disable deleting records in a table or query ?

Filip

Reply With Quote
  #2  
Old   
John Spencer
 
Posts: n/a

Default Re: disable deleting records in table - 12-01-2010 , 06:36 AM






Yes and No

What are you using as the data store? Access Jet/Ace or some SQL database server.

If you are using Access native database to store the data and you allow people
to work directly with the tables and directly with updateable queries then it
is NOT possible to stop records from being deleted.

If you control all access to the data using forms then it is possible to
cancel any delete actions or preclude them in the first place.

Set all forms' AllowDeletions property to False (No) to not allow any record
deletion using the form.

If you want to you can also use code in a form's delete event to cancel
deletions. Normally you would do that when you wanted to run some checks and
allow deletion in some cases and prohibit it in other cases.

Private Sub Form_Delete(Cancel As Integer)
Cancel = True
End Sub


John Spencer
Access MVP 2002-2005, 2007-2010
The Hilltop Institute
University of Maryland Baltimore County

On 12/1/2010 5:21 AM, Filips Benoit wrote:
Quote:
Dear All,

Is it possible to disable deleting records in a table or query ?

Filip

Reply With Quote
  #3  
Old   
Filips Benoit
 
Posts: n/a

Default Re: disable deleting records in table - 12-01-2010 , 12:12 PM



Thanks,

1. Years ago I told the company that it was better to use SQL-server as data
store but the were not willing to pay for it! Now about 10 frontends are
linked to the 1 access datastore-backend.
2. All deleting is unabled in the forms they should use but the new IT-man
simply has told some user they could go directly to the tables by using
shift while opening a database. Now some records has been deleted not
knowing who and when.
3. I think the user-permissions are not set properly so to many people can
use some databases they should not be able to open ! So I know that the old
It-man still can open all company's data!!!! Setting User-permissions is not
my job, so I'll have a nice conversation with the new IT-man.

Thanks,

Filip


Filip

"John Spencer" wrote in message
news:id5ffi$t9d$1 (AT) news (DOT) eternal-september.org...

Yes and No

What are you using as the data store? Access Jet/Ace or some SQL database
server.

If you are using Access native database to store the data and you allow
people
to work directly with the tables and directly with updateable queries then
it
is NOT possible to stop records from being deleted.

If you control all access to the data using forms then it is possible to
cancel any delete actions or preclude them in the first place.

Set all forms' AllowDeletions property to False (No) to not allow any record
deletion using the form.

If you want to you can also use code in a form's delete event to cancel
deletions. Normally you would do that when you wanted to run some checks
and
allow deletion in some cases and prohibit it in other cases.

Private Sub Form_Delete(Cancel As Integer)
Cancel = True
End Sub


John Spencer
Access MVP 2002-2005, 2007-2010
The Hilltop Institute
University of Maryland Baltimore County

On 12/1/2010 5:21 AM, Filips Benoit wrote:
Quote:
Dear All,

Is it possible to disable deleting records in a table or query ?

Filip

Reply With Quote
  #4  
Old   
Marshall Barton
 
Posts: n/a

Default Re: disable deleting records in table - 12-01-2010 , 01:30 PM



Filips Benoit wrote:
Quote:
1. Years ago I told the company that it was better to use SQL-server as data
store but the were not willing to pay for it! Now about 10 frontends are
linked to the 1 access datastore-backend.
2. All deleting is unabled in the forms they should use but the new IT-man
simply has told some user they could go directly to the tables by using
shift while opening a database. Now some records has been deleted not
knowing who and when.
Maybe you should also turn the AllowBypassKey property off.
See VBA Help for an example.

--
Marsh

Reply With Quote
  #5  
Old   
Filips Benoit
 
Posts: n/a

Default Re: disable deleting records in table - 12-01-2010 , 03:28 PM



Thanks,

very good suggestion !

Filip

"Marshall Barton" wrote in message
newsf8df6hvg5vp8vudlv5et1u6884avc4ccs (AT) 4ax (DOT) com...

Filips Benoit wrote:
Quote:
1. Years ago I told the company that it was better to use SQL-server as
data
store but the were not willing to pay for it! Now about 10 frontends are
linked to the 1 access datastore-backend.
2. All deleting is unabled in the forms they should use but the new IT-man
simply has told some user they could go directly to the tables by using
shift while opening a database. Now some records has been deleted not
knowing who and when.
Maybe you should also turn the AllowBypassKey property off.
See VBA Help for an example.

--
Marsh

Reply With Quote
  #6  
Old   
Tony Toews
 
Posts: n/a

Default Re: disable deleting records in table - 12-04-2010 , 08:07 PM



On Wed, 1 Dec 2010 19:12:20 +0100, "Filips Benoit"
<benoit.filips (AT) telenet (DOT) be> wrote:

Quote:
Now some records has been deleted not
knowing who and when.
If Cascade Deletes are turned on for some relationships this will make
the problem worse.

Tony
--
Tony Toews, Microsoft Access MVP
Tony's Main MS Access pages - http://www.granite.ab.ca/accsmstr.htm
Tony's Microsoft Access Blog - http://msmvps.com/blogs/access/
For a convenient utility to keep your users FEs and other files
updated see http://www.autofeupdater.com/

Reply With Quote
  #7  
Old   
Tony Toews
 
Posts: n/a

Default Re: disable deleting records in table - 12-04-2010 , 08:08 PM



On Wed, 01 Dec 2010 13:30:47 -0600, Marshall Barton
<marshbarton (AT) wowway (DOT) com> wrote:

Quote:
Maybe you should also turn the AllowBypassKey property off.
So long as moron IT person isn't reading this thread or others which
tell moron IT person to update the setting via code.

Tony
--
Tony Toews, Microsoft Access MVP
Tony's Main MS Access pages - http://www.granite.ab.ca/accsmstr.htm
Tony's Microsoft Access Blog - http://msmvps.com/blogs/access/
For a convenient utility to keep your users FEs and other files
updated see http://www.autofeupdater.com/

Reply With Quote
  #8  
Old   
a a r o n _ k e m p f
 
Posts: n/a

Default Re: disable deleting records in table - 01-03-2011 , 06:20 AM



maybe you should shut the fuck up and learn how to use SQL Server before trying to sell it?

Disabling delete is a simple SQL Server permission!

Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.