Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

form passing parameter to the report 1

Status
Not open for further replies.

pthakar

Programmer
Feb 28, 2003
38
US
Hello all,
Is there a way I can pass parameter through a form to a report. I have report rptbldg for all buildings and multiple lease details. I need user to select a submarket and a class from a form fmpass. On Fmpass I have combo box for submarket and class. By click the submit button user would be able to pass the criteria.
Does Any body knows How to do ????
Thanks
 
Your report should get its' data from a query. The QUERY will get its' criteria from the form's text boxes. As long as the form is open when you call the report, the report will call the query, which will see the criteria on the text boxes.

The criteria cell(s) on the query grid will look something like this, with appropriate substitution for your object names:

=Forms!{Your Form Name}!{Your Field or Text box Name}

For Example,

=Forms!FMPASS!SubMarket








Me? Ambivalent? Well, yes and no....
Another free Access forum:
More Access stuff at
 
You could also open the report and specify a WHERE clause:

DoCmd.OpenReport "YourReport", , , "[SubMarket] = '" & Forms!FMPASS!SubMarket & "' "

[thumbsup] Anthony J. DeSalvo
President - ScottTech Software
"Integrating Technology with Business"
 
Anthony J. DeSalvo
Thank you very much. It works
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top