Solved

Pass two open args to a REPORT in ACCESS 2003

Posted on 2013-01-18
3
381 Views
Last Modified: 2013-01-18
I have a form whereby users select a year and a quarter and run the report.  I want these two values to populate two text fields on the report.  I am trying to use opening argu, but I am not gettng anywhere.  Teh questions marks are where I want the values from txtEvalYear and txtEvalQuarter to go so they appear on the report.

    DoCmd.OpenReport "rptDataSourceRankingCounts", acPreview, , , acWindowNormal,????

Sandra
0
Comment
Question by:ssmith94015
[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 29

Accepted Solution

by:
IrogSinta earned 500 total points
ID: 38795165
Well if the form is still open, you can just refer  straight back to the controls on your form like so:
= Forms!NameOfForm!txtEvalYear

This could go in your code or it can be the expression in the control source of your textbox in the report.
0
 
LVL 29

Expert Comment

by:IrogSinta
ID: 38795180
If you did want to go the OpenArgs way, you would need to combine your strings into a single string first and assign it to OpenArgs.  Then in your report you would need to add code to parse the string into its components.  The previous method I mentioned is simpler.
0
 

Author Closing Comment

by:ssmith94015
ID: 38795189
That did it and was simple, thank you.

Sandra
0

Featured Post

Want Experts Exchange at your fingertips?

With Experts Exchange’s latest app release, you can now experience our most recent features, updates, and the same community interface while on-the-go. Download our latest app release at the Android or Apple stores today!

Question has a verified solution.

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

You need to know the location of the Office templates folder, so that when you create new templates, they are saved to that location, and thus are available for selection when creating new documents.  The steps to find the Templates folder path are …
The Windows Phone Theme Colours is a tight, powerful, and well balanced palette. This tiny Access application makes it a snap to select and pick a value. And it doubles as an intro to implementing WithEvents, one of Access' hidden gems.
The viewer will learn how to create a normally distributed random variable in Excel, use a normal distribution to simulate the return on an investment over a period of years, Create a Monte Carlo simulation using a normal random variable, and calcul…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…
Suggested Courses

630 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