frmFiscalYear > frmBulkObligations > sfrmProjects
I open frmFiscalYear in read-only mode (apparently this also affects the subforms, which is what I want) using the following code:
Expand|Select|Wrap|Line Numbers
- Private Sub cmdBOViewAll_Click()
- On Error GoTo Err_cmdBOViewAll_Click
- Dim stDocName As String
- Dim stLinkCriteria As String
- stDocName = "frmFiscalYear"
- DoCmd.OpenForm stDocName, , , , acFormReadOnly
- Exit_cmdBOViewAll_Click:
- Exit Sub
- Err_cmdBOViewAll_Click:
- MsgBox Err.Description
- Resume Exit_cmdBOViewAll_Click
- End Sub
Problem: When I open frmFiscalYear (and its subforms) in read-only mode, it works fine. However, when I double-click the datasheet to open up frmViewAllResources, frmViewAllResources is editable and, upon closing, allows me to edit frmFiscalYear. Effectively, frmViewAllResources becomes a backdoor for editing when frmFiscalYear should be in read-only mode. Can the above code be modified to include frmViewAllResources as read-only, too?
Thanks in advance.