Solved

Pass two open args to a REPORT in ACCESS 2003

Posted on 2013-01-18
3
363 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
  • 2
3 Comments
 
LVL 29

Accepted Solution

by:
IrogSinta earned 500 total points
Comment Utility
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
Comment Utility
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
Comment Utility
That did it and was simple, thank you.

Sandra
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Lync meeting or Lync conferencing is what many organizations would like to deploy to allow them save money. But companies are now giving up for various reasons, one of which is that they cannot join external meetings (non-federated company meetings)…
A simple tool to export all objects of two Access files as text and compare it with Meld, a free diff tool.
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.
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…

744 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

13 Experts available now in Live!

Get 1:1 Help Now