View Full Version : Read Only Forms


mark curtis
04-12-2001, 04:40 AM
I have a tabbed form with several forms & sub forms on and in order to load this form I have two command buttons.

Cmd button 1 allows a user to open and edit the form above.

Cmd button 2is supposed to allow the user read only access. This works fine for the forms on the tabbed form but and sub forms disappear.

Is there any way that I can make the sub forms appear and be read only as well.

Cmd button code:

Private Sub cmdViewWP_Click()
On Error GoTo Err_cmdViewWP_Click

Dim stDocName As String
Dim stLinkCriteria As String

stDocName = "frmDocumentRegister"

stLinkCriteria = "[ProjectID]=" & Me![ProjectID]
DoCmd.OpenForm stDocName, , , stLinkCriteria, acFormReadOnly, acWindowNormal


Exit_cmdViewWP_Click:
Exit Sub

Err_cmdViewWP_Click:
MsgBox Err.Description
Resume Exit_cmdViewWP_Click

End Sub