Solved

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

Posted on 2012-03-11
3
304 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

Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

Join & Write a Comment

I see at least one EE question a week that pertains to using temporary tables in MS Access.  But surprisingly, I was unable to find a single article devoted solely to this topic. I don’t intend to describe all of the uses of temporary tables in t…
If you have heard of RFC822 date formats, they can be quite a challenge in SQL Server. RFC822 is an Internet standard format for email message headers, including all dates within those headers. The RFC822 protocols are available in detail at:   ht…
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.
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

762 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

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now