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

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • moonrb
    New Member
    • Nov 2013
    • 23

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

    Hi
    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
  • twinnyfo
    Recognized Expert Moderator Specialist
    • Nov 2011
    • 3653

    #2
    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.

    Comment

    • MikeTheBike
      Recognized Expert Contributor
      • Jun 2007
      • 640

      #3
      Hi

      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.

      HTH

      MTB

      Comment

      • zmbd
        Recognized Expert Moderator Expert
        • Mar 2012
        • 5501

        #4
        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.

        Comment

        Working...