Passing Arguments to Another Form

TheStriker

Registered User.
Local time
Today, 15:30
Joined
Jan 5, 2004
Messages
17
Hello,

I have an unbound password form for users to log in. When the user clicks OK after entering username and password, it then goes and matches the username with their password from the User's Table and opens another form. What I'd like to do is when the user clicks OK, to pass a value to the opening form and enter that value into a field on the form. Is there any way to accomplish this? Let me know if you need more info. Thanks in advance.
 
You can use the form's OpenArgs property.

If you open a form with code:

Code:
DoCmd.OpenForm "MyForm", , , , , , "Information"

...you can send a piece of information. In this case, I've sent the word "Information" to the form called "MyForm".

On the form "MyForm" you can now use the OpenArgs property.

Code:
MsgBox Me.OpenArgs
 
Hey Mile-O-Phile,

Will this method work with unbound forms?
 

Users who are viewing this thread

Back
Top Bottom