Form parameters

DebSabre

Registered User.
Local time
Today, 16:12
Joined
Jul 8, 2003
Messages
17
I have one form I would like to open from two different places. In one case I would like to open the form with some fields disabled, in another place I would like the form opened with all fields enabled. I hate to build a copy of the same form for this. Can I pass a parameter so that it may change its behaviour?
 
You can use the Form's OpenArgs when opening a form in code.

i.e.

Code:
DoCmd.OpenForm "frmYourFormName", , , , , , "These Are The OpenArgs"

On the Form you wish to use, you can then review the value of the OpenArgs and disable controls accordingly.
 
Thanks

Thanks, that's what I needed.
 

Users who are viewing this thread

Back
Top Bottom