M
MikeC
I'm developing a form in AXP that has multiple subforms.
The form works fine when it is opened in "Add/Edit/Delete"
mode. However, when I open the form in "read only" mode,
any subform that has no related records will display
without any controls (including command buttons). The
same will happen to the main form if the user
inadvertantly applies a filter that excludes all records.
The above behavior occurs *only if* the form is opened
in "read only" mode. This may be a built-in feature of
AXP, but I'd rather have the form behave as it does
in "Add/Edit/Delete" mode, except without the adding and
editing.
Does anyone know how to resolve this issue?
Below is the code that I'm using to open the form (from a
switchboard form):
' Open a form and set add/edit/delete mode
Case conCmdOpenFormBrowse
DoCmd.OpenForm rs![Argument]
Forms(rs![Argument]).Caption = Forms(rs!
[Argument]).Caption _
& " - Add/Edit/Delete"
' Open a form and set read only mode
Case conCmdOpenFormView
DoCmd.OpenForm rs![Argument],,,,acFormReadOnly
Forms(rs![Argument]).Caption = Forms(rs!
[Argument]).Caption _
& " - View Only"
The form works fine when it is opened in "Add/Edit/Delete"
mode. However, when I open the form in "read only" mode,
any subform that has no related records will display
without any controls (including command buttons). The
same will happen to the main form if the user
inadvertantly applies a filter that excludes all records.
The above behavior occurs *only if* the form is opened
in "read only" mode. This may be a built-in feature of
AXP, but I'd rather have the form behave as it does
in "Add/Edit/Delete" mode, except without the adding and
editing.
Does anyone know how to resolve this issue?
Below is the code that I'm using to open the form (from a
switchboard form):
' Open a form and set add/edit/delete mode
Case conCmdOpenFormBrowse
DoCmd.OpenForm rs![Argument]
Forms(rs![Argument]).Caption = Forms(rs!
[Argument]).Caption _
& " - Add/Edit/Delete"
' Open a form and set read only mode
Case conCmdOpenFormView
DoCmd.OpenForm rs![Argument],,,,acFormReadOnly
Forms(rs![Argument]).Caption = Forms(rs!
[Argument]).Caption _
& " - View Only"