When I run one of my reports it always occurs "Enter Parameter Value' for a particular datafield. I get the correct report displayed even when I by pass or provide any value for this parameter.
My report is based on a query (based on another pre-query) and the said field I used long back in that query. Later on I removed this field from both pre and main query. But still it demands same parameter value while executing my report. Many times I checked all the text boxes, labels and all other criterias on the report. The field that value being asked for is surely no more exist on the report nor referred in any event procedure of the report.
If I run query directly, it works smoothly. But when run report based on this query, it ask parameter value for one field.
Though not exactly sure of the problem, I have had that same one in the past. What I did was Removed the RecordSource from the Report. Created a NEW QUERY. Set that NEW QUERY as the Report RecordSource. Sometimes it seems even when you remove certain things in the query, the associated report still remembers that and won't let go. Not sure why but it seems to happen. Hope that works for you.
Since you already looked for it in the query that is feeding the report, it appears that it is in your report. You may want to try the documenter feature. Select Tools;Analyze;Documenter from the menu. Select the report that is giving you the problem. Export the results to the .rtf format and then open that document in Word and do an Edit;Find for the exact name of the parameter that the report has been asking for. This should show you where it is in your report. Then go back to Access and go into report design and remove this reference.
i have had the same problem as well.. but have never figured out a solution for it.. I knew the parameter that it was looking for but it was from an earlier version of my program and in the later version all references to that were erased. I had to start from scratch and have decided against setting parameter values in queries.
If it could be in the query, check either in the SQL, or when in design view - Query | Parametes and remove it from there, should it exist.
If it is in the report, and you can't find it, another option is to try using the hidden method .SaveAsText of the application object to dump the report to a text file. Then search the text file for the field/parameter:
.....Later on I removed this field from both pre and main query. But still it demands same parameter value while executing my report.
With kind regards,
AHA!!!!! Just duplicated your problem and should have known it as I did that before too. You removed a field from your Query. BUT, Did you remove THAT FIELD from the REPORT????? I bet you it is still in your report. So just go into your report and REMOVE that field there too.
Surely I had removed that field from report. Morevover I checked many-many times in both query and report.
But still problem exists. I did the way what one of our member suggest below to use tools--Analyze---Documenter and send report in rtf format. No field like found. But I don't know about hidden method to SaveAsText.
If someone could give me green signal, I'll attach a zip file of db along with minimum related objects and records.
No doubt my report has plenty of other run-time text boxes (not from the query) that created to use IIF conditions to calculate many things. It will be difficult to trace out where is that particular text box that asking value.
2 things, first, the only text box asking value is an Arabic word (rest all fields are in English) and second..it is somewhere in detail section of the report bcz I tried run report deleting some of text boxes and found then report did not ask value for that text box. But it was not among the text boxes I deleted. So its become very strange for me.
When you run direct report, it will ask you value of combo26... please copy and paste this 'January 2005' so that it would generate records to show in report.
Sorry Ashfaque, I didn't see your post that you checked the sorting and grouping. How about the Filter in the report? Did you check that or the Order By? If you want to send me the report and query I can take a look - email@example.com.
It was difficult to find your problem with just the query in the Access file you sent. I did notice that though that you had a field in the query called: month name with a criteria of: [forms]![SALARYSHEETFORM].[combo26]. This could be the root of your problem. Month is a reserved word which may be causing the problem (but I doubt it.) Also, are you sure the form: SALARYSHEETFORM is open/minimized? If you're getting a parameter asking for combo26, I'm betting it can't find this field on the form or the form isn't open/minimized when the report is opening.
That's the best I can do without more info.
As a last note, to save yourself some headaches, try to keep from using spaces in the field names.