Solved

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

Posted on 2012-03-11
3
308 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

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

This article describes how to use the timestamp of existing data in a database to allow Tableau to calculate the prior work day instead of relying on case statements or if statements to calculate the days of the week.
Phishing attempts can come in all forms, shapes and sizes. No matter how familiar you think you are with them, always remember to take extra precaution when opening an email with attachments or links.
Learn how to number pages in an Access report over each group. Activate two pass printing by referencing the pages property: Add code to the Page Footers OnFormat event to capture the pages as there occur for each group. Use the pages property to …
In Microsoft Access, when working with VBA, learn some techniques for writing readable and easily maintained code.

751 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