Passing OpenArgs To A Subform

Lynn_AccessUser

Registered User.
Local time
Today, 12:22
Joined
Feb 4, 2003
Messages
125
I have a button on a form(Form1) with the following code:

DoCmd.OpenForm "Form1", , , , , , "ReadOnly"

On the load event on Form2 I have the following code:

If Me.OpenArgs = "ReadOnly" Then
Me.FieldName.Locked = True
Me.FieldName.BackColor = 12632256
Else
Me.FieldName.Locked = False
Me.FieldName.BackColor = -2147483643
End If

The code works fine, but I want to pass the same OpenArgs
to a subform on Form2 to lock and unlock fields. Does
anyone know how to do this.

Thanks!!!!
 

Users who are viewing this thread

Back
Top Bottom