CodeCharge Studio

ReadAllowed Run-Time Property (ASP)

Applies to

EditableGrid Form, Record Form






object.ReadAllowed [=value]


This property contains a Boolean flag that if set to true, prevents displaying record's data. If the property is set to true, the form is working in insert mode regardless of the passed parameters.

This property may be used to prevent users from viewing particular records. Personal entries can be protected using custom code that resets this property.

The property's value has to be set in the form's Before Select event or earlier.


The following example allows users to browse only their own records.
The example assumes DiaryEntry form exists and there is author_id hidden field to keep record's author identifier. This code may be inserted into Before Select event or earlier (form's Before Show is called after property checking).
If DiaryEntry.author_id.Value = CCGetUserID() Then
  DiaryEntry.ReadAllowed = True
  DiaryEntry.ReadAllowed = False
End If

See also

Before Select event
UpdateAllowed property
DeleteAllowed property
InsertAllowed property

On-line, printable versions and updates