Solved

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

Posted on 2012-03-11
3
306 Views
Last Modified: 2012-03-26
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.
0
Comment
Question by:solarisinfosys
  • 2
3 Comments
 
LVL 61

Accepted Solution

by:
mbizup earned 500 total points
ID: 37706780
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
 

Author Closing Comment

by:solarisinfosys
ID: 37768224
mbizup - Thanks it worked. Sorry I didn't get back to you sooner. I've just been extremely busy.
0
 
LVL 61

Expert Comment

by:mbizup
ID: 37768270
Glad that helped out :-)
0

Featured Post

3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

In a multiple monitor setup, if you don't want to use AutoCenter to position your popup forms, you have a problem: where will they appear?  Sometimes you may have an additional problem: where the devil did they go?  If you last had a popup form open…
As tax season makes its return, so does the increase in cyber crime and tax refund phishing that comes with it
Familiarize people with the process of utilizing SQL Server functions from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Ac…
With Microsoft Access, learn how to start a database in different ways and produce different start-up actions allowing you to use a single database to perform multiple tasks. Specify a start-up form through options: Specify an Autoexec macro: Us…

770 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question