how to pass an argument from one form to another form in MS ACCESS 2003

I'm trying to pass an argument from one form to another. I don't know how to do this. I want the second form to use the argument passed by the first form as a criteria but don't know how to do this.
solarisinfosysAsked:
Who is Participating?

Improve company productivity with a Business Account.Sign Up

x
 
mbizupConnect With a Mentor Commented:
Couple of ways to do this:

1 - OpenArgs when you use VBA to open Form2:

Docmd.OpenForm "Form2", OpenArgs:="Something"

and in form 2, refer to the OpenArgs like this:

PassedArgument = Me.OpenArgs



OR
2.  If you want to use criteria from Form1 to filter the records in Form2:

Docmd.OpenForm "Form2", WhereCondition:="ID=" & Me.ID
0
 
solarisinfosysAuthor Commented:
mbizup - Thanks it worked. Sorry I didn't get back to you sooner. I've just been extremely busy.
0
 
mbizupCommented:
Glad that helped out :-)
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.