By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
434,949 Members | 2,043 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 434,949 IT Pros & Developers. It's quick & easy.

how can i prevent users deleting the record when they are viewing datasheet view

P: 23
Every one
how can i prevent users deleting the record but edit on table when they are viewing datasheet view through "SELECT QUERY"

I am using user & password table with VB CODE for securing the database.

thanks In Advance
Dec 23 '13 #1
Share this Question
Share on Google+
3 Replies

Expert Mod 2.5K+
P: 3,284
Are the users viewing the query or is this on a form? If it is a query, if the recordset is updateable, you can't prevent this. If it is on a form, you can set the Enabled and Locked properties of each field to No and Yes, respectively.

Please provide more information.
Dec 23 '13 #2

Expert 100+
P: 634

If you are using a Form in Datasheet View, then an alternative to twinneffo's solution, you could set the 'Allow Deletions' property to No in the fprm's property dialogue in design view. This will still allow editing unless you also set the 'Allow Edits' property also to No.


Dec 23 '13 #3

Expert Mod 5K+
P: 5,397
You also need to tell us which version of Access you are using.

Keep in mind, that almost everything you do in Access to secure the database can be circumvented by a knowledgable user.
Dec 23 '13 #4

Post your reply

Sign in to post your reply or Sign up for a free account.