# Access Property
> Version: _Available or changed with runtime version 4.0._
Sets the object accessibility level, which controls whether the object can be used from other code in your module or other modules.
## Applies to
 Codeunit
 Query
 Table
 Table field
 Enum Type
 Interface
 Permission Set
## Property value
Value|Available or changed with|Description
Public|runtime version 4.0|The object can be accessed by any other code in the same module and in other modules that references it.
Internal|runtime version 4.0|The object can be accessed only by code in the same module, but not from another module.
### Table field level
For table fields there are two additional settings for Access and you have the following settings available:
Access modifier|Level of accessibility
Local|The field can be accessed only by code in the same table or table extension where the field is defined.
Protected|The field can be accessed only by code in the same table or table extensions of that table.
Public|The object can be accessed by any other code in the same module and in other modules that references it. It is the default value.
Internal|The object can be accessed only by code in the same module, but not from another module.
## Syntax
### Tables
```al
table 50111 MyTable
{
    DataClassification = CustomerContent;
    Access = Internal;
    ...

```
### Table fields
```al
table 50111 MyTable
{
    DataClassification = CustomerContent;

    fields
    {
        field(1;MyField; Integer)
        {
            DataClassification = CustomerContent;
            Access = Protected;
    ...

```
### Queries
```al
query 50114 MyQuery
{
    QueryType = Normal;
    Access = Internal;
    ...
```
### Codeunits
```al
codeunit 50113 MyCodeunit
{
    Access = Internal;
    ...

```
## Remarks
> IMPORTANT
> This property is only taken into consideration at compile time. For example, at compile time, a table with `Access = Internal` cannot be used from other modules that do not have access to the internals of the module where the table is defined, but at runtime, any module can access the table by using reflection-based mechanisms such as RecordRef, or TransferFields. And the OnRun trigger can be run on internal codeunits by using Codeunit.Run. Setting the object accessibility level as `Access = Internal;` cannot be used as a security boundary. Also see ../devenv-json-files#appjson-file.
> NOTE
> The accessibility of tables and table fields is taken into account when using ../devenv-inclient-designer. As a consequence, only table fields which have their accessibility set to Public can be added to the page.
## Related information
devenv-properties
devenv-extensible-property
../devenv-protected-variables

Copyright (c) Microsoft Corporation. CC BY 4.0, https://creativecommons.org/licenses/by/4.0/; code samples MIT. From https://learn.microsoft.com/en-us/dynamics365/business-central/dev-itpro/developer/properties/devenv-access-property, MicrosoftDocs/dynamics365smb-devitpro-pb at 828b6ee (2026-11-19). Changed: includes filled in, links to this site, and for agents shortened without dropping a fact. https://jonas-paprotka.de/docs/dev-itpro/developer/properties/devenv-access-property/
