Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

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

Posted on 2012-03-11
3
Medium Priority
?
311 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 2000 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

Nothing ever in the clear!

This technical paper will help you implement VMware’s VM encryption as well as implement Veeam encryption which together will achieve the nothing ever in the clear goal. If a bad guy steals VMs, backups or traffic they get nothing.

Question has a verified solution.

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

This post looks at MongoDB and MySQL, and covers high-level MongoDB strengths, weaknesses, features, and uses from the perspective of an SQL user.
This month, Experts Exchange sat down with resident SQL expert, Jim Horn, for an in-depth look into the makings of a successful career in SQL.
In Microsoft Access, learn different ways of passing a string value within a string argument. Also learn what a “Type Mis-match” error is about.
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …

916 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