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

x
?
Solved

Pass two open args to a REPORT in ACCESS 2003

Posted on 2013-01-18
3
Medium Priority
?
387 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 2000 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

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

Microsoft's Excel has many features that most people will never need nor take advantage of.  Conditional formatting is one feature that you may find a necessity once you start using it.
Instead of error trapping or hard-coding for non-updateable fields when using QODBC, let VBA automatically disable them when forms open. This way, users can view but not change the data. Part 1 explained how to use schema tables to do this. Part 2 h…
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: …
Look below the covers at a subform control , and the form that is inside it. Explore properties and see how easy it is to aggregate, get statistics, and synchronize results for your data. A Microsoft Access subform is used to show relevant calcul…

927 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