Multipurpose Form & OpenArg

Exodus

Registered User.
Local time
Yesterday, 16:12
Joined
Dec 4, 2003
Messages
317
I'm trying to create a multipurpose password field to enable some privalaged users to edit some fields in my db. I'm trying to pass the FormName and Control Name via open args.
Then if the user inputs the correct password it will unlock that field for editing.

Here is the openargs
Code:
DoCmd.OpenForm "frmPasswordEditLockedFormFields", acNormal, , , , , "Forms!FrmPollsAttributes!" & Forms!FrmPollsAttributes.Controls("Region").Name

Here is the unlock code

Code:
Dim Funlock As Boolean
'On Error GoTo err_PASSWORD_AfterUpdate

Select Case (Environ("UserName"))
Case "Someone"

     If Me![PASSWORD] = "romans623" Then
        gOkToClose = True
  'Forms!FrmPollsAttributes!Region.Locked = False
 
 Me.OpenArgs.Locked = False
  
    DoCmd.Close A_FORM, "frmPasswordEditLockedFormFields" '
        End If

        
   End Select

I'm getting object required and highlighted on Me.OpenArgs.Locked = False

I have tried countless things but nothing seems to work. Is this even possible? If so how?
Thanks
 
Last edited:
Got Will Post Later Gota go home every one enjo the holiday.
 
What in the name of Bill Gates are you trying to do with Me.OpenArgs.Locked = False? OpenArgs is a property of the form, not a control that can be locked or unlocked!
 

Users who are viewing this thread

Back
Top Bottom