Share via

Disable design view

Anonymous
2011-05-22T02:27:16+00:00

I use the code below to restrict what users with Read Only access can do. Is there any line of code that will prevent them from right clicking on the form to access the design view? So in effect disabling shortcut menues.

  Case 3: 'Read Only

    DoCmd.RunCommand acCmdWindowHide

    DoCmd.ShowToolbar "Ribbon", acToolbarNo

        Me.txbFirst_Name.Locked = True

        Me.txbLast_Name.Locked = True

        Me.txbLocation_Name.Locked = True

        Me.txbStreetNumber.Locked = True

        Me.txbStreetName.Locked = True

        Me.txbNotes.Locked = True

        Me.txbCheckPerformedBy.Locked = True

        Me.txbDateOfCheck.Locked = True

        Me.Attachment1.Locked = True

        Me.btnDeleteRecord.Visible = False

Microsoft 365 and Office | Access | For home | Windows

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments

2 answers

Sort by: Most helpful
  1. Anonymous
    2011-05-22T15:42:48+00:00

    I am not ready to convert to ACCDE because things are still evolving and honestly I am way to new at this to create a split database.

    I intended to credit the person that provided the code below but lost track of the link.

        'Next 3 lines prevents use of shortcut menus

            For i = 1 To CommandBars.Count

            CommandBars(i).Enabled = False

            Next i

    Was this answer helpful?

    10+ people found this answer helpful.
    0 comments No comments
  2. Anonymous
    2011-05-22T07:10:19+00:00

    Actually, you can set in the file->options, current database. In that area, you can un-check the "Allow default menus" in options. This will disable all right click options (perhaps more options then you want to be disabled, but it will work).

    Another way to disable all all design changes, all report changes and even change of code is to create a accDE.

    You can create this "execute only" application by going file -> save and publish.

    And then on the right side of Advanced, then choose make ACCDE. You MUST however keep a copy of the original version of your database since users AND EVEN YOU will not be able to make further changes to this database. This also often suggests that if future updates are to be made to this application, then you have a split database..

    Albert D. Kallal  (Access MVP)

    Edmonton, Alberta Canada

    Was this answer helpful?

    10+ people found this answer helpful.
    0 comments No comments