ReadOnly Property

See AlsovbproReadOnlySee

Applies To

Data control2E1FEX3, file list box1M6S8UX.

Description

         Data controldetermines whether the control's Database is opened for read-only access.

         File list boxdetermines whether a file list box contains files with ReadOnly attributes.

 

Read/write at both design time and run time.

Syntax

[form.] control.ReadOnly [ =True | False}]

Setting

The ReadOnly property settings are:

Setting          Description

 

True              Data controlthe control's Database is opened with read-only access to data.  Changes to data are not allowed.
File list boxthe control includes read-only files in the list.

False             (Default) Data controlthe control's Database is opened with read/write access to data.
File list boxno read-only files are listed in the control.

 

Remarks

Use this property with a data control to specify whether data in the underlying Database can be changed.  For example, you might create an application that only displays data.  A read-only Database is also faster.

For a data control, this property is used only the first time a database is opened by your application.  If your application subsequently opens other instances of the database, the property is ignored.  For a change in this property to take effect, you must close all instances of the database and then use the Refresh method.

In the Professional Edition, this property corresponds to the readonly argument in the OpenDatabase function.

Use this property with a file list box to specify which kinds of files to display, based on standard file attributes used in the operating environment.  Setting this property at run time resets the list to display only those files with the corresponding attributes.  For example, in an application with restricted levels of access, you might want to display only read-only files by setting ReadOnly to True.

Data Type

IntegerDOKXHY (Boolean)