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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Asking for parameter again in report

Status
Not open for further replies.

sangathy

Programmer
Apr 27, 2006
7
US
I have a report with a changing where clause for the recordsource.

I am using
DoCmd.OpenReport "Action", acPreview, , sqlCondition, , strfinal3 + "." & " Status: " + strfinal2

sqlCondition = " Year_entered BETWEEN 2003 AND 2004 "
( the year is input from user)

The recordsourse for the report is a query that look like this.

SELECT Company.name, Action.last_contact_date, Action.next_action_date, Action.next_action, Company.list_status
FROM [Action] INNER JOIN Company ON Action.company_id=Company.company_id;

I use a form as the parameters. Even if i pass the parameters it is still asking for the Year_entered.

I spend a lot of time debugging but can't figure out why.

Thanks in advance.

 
maybe put the parameter in your query instead of the VBA. you could put [Please Enter the Year] in the criteria field of the query.
 
Thank you . But I can't do that since i have lot of other parameters for the user to select in the form.
 
Your report's record source doesn't include a field named "Year_entered".

Duane MS Access MVP
[green]Ask a great question, get a great answer.[/green] [red]Ask a vague question, get a vague answer.[/red]
[green]Find out how to get great answers faq219-2884.[/green]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top