Opening form as Read-Only

G

Guest

Hi all,
I have a form that gives the users a menu of command buttons to open other
forms.
One option is to open and have full edit ability to the "Claim Master" form.
Some users should not be able to change the records on the "Claim Master"
form but require read-only capabilities. I would like to have a command
button on the initial form that opens the "Claim Master" in read-only.
What's the best way? Also, the "Claim Master" form has a subform. Does the
command button need to do anything to make this read-only as well?

Thanks in Advance,
Paul
 
G

Guest

On the OpenForm command line add the argument that specified that the form
will be open for read only (acFormReadOnly)

Docmd.OpenForm "111",,,,acFormReadOnly
 
G

Guest

Think I figured it out, seems to work anyways. I used the button wizard to
open the form and then went in and adjusted the code by adding the
acFormReadOnly. Anyone see any problems/concerns with this?

Private Sub OpenClaimMasterForPHS_Click()
On Error GoTo Err_OpenClaimMasterForPHS_Click

Dim stDocName As String
Dim stLinkCriteria As String

stDocName = "Claim Master"
DoCmd.OpenForm stDocName, , , , acFormReadOnly, , stLinkCriteria

Exit_OpenClaimMasterForPHS_Click:
Exit Sub

Err_OpenClaimMasterForPHS_Click:
MsgBox Err.Description
Resume Exit_OpenClaimMasterForPHS_Click

End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top