passing form as form to the module (1 Viewer)

mstres

Registered User.
Local time
Yesterday, 16:01
Joined
Mar 18, 2009
Messages
24
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
 
Last edited:

pbaldy

Wino Moderator
Staff member
Local time
Yesterday, 16:01
Joined
Aug 30, 2003
Messages
36,129
Untested, but try

DoCmd.OpenForm ofrmName.Name
 

mstres

Registered User.
Local time
Yesterday, 16:01
Joined
Mar 18, 2009
Messages
24
Untested, but try

DoCmd.OpenForm ofrmName.Name
Thank you for trying to help but I have complitly difference isue.
I need to pass form from one form to module, monipulate with user security and after that open form with RW or RO or not open at all
Thank you again
Mike
 

Users who are viewing this thread

Top Bottom