How to pass form as form to module with out open a form.
I have a lot of users with difference privileges RW, RO, NO Access at all
I would like to use one module and passing form as object or form and manipulate with user security.
I can pass form as form when form is open.
My code: call from Form1
Private Sub Command1_Click()
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "form2"
DoCmd.OpenForm stDocName, , , stLinkCriteria
Call pOpenForm(Forms!form2)
End Sub
Call to Module:
Private Function pOpenForm(ByVal ofrmName As Form)
ofrmName.AllowEdits = True
ofrmName.AllowAdditions = True
End Function
This code is working, but I would like to move
DoCmd.OpenForm stDocName, , , stLinkCriteria
to module.
Thank you in advance
Mike
I have a lot of users with difference privileges RW, RO, NO Access at all
I would like to use one module and passing form as object or form and manipulate with user security.
I can pass form as form when form is open.
My code: call from Form1
Private Sub Command1_Click()
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "form2"
DoCmd.OpenForm stDocName, , , stLinkCriteria
Call pOpenForm(Forms!form2)
End Sub
Call to Module:
Private Function pOpenForm(ByVal ofrmName As Form)
ofrmName.AllowEdits = True
ofrmName.AllowAdditions = True
End Function
This code is working, but I would like to move
DoCmd.OpenForm stDocName, , , stLinkCriteria
to module.
Thank you in advance
Mike
Last edited: