Tech Support Guy banner

Solved: MS Access report load from a form having report criteria

2884 Views 17 Replies 2 Participants Last post by  OBP
Dears,I have designed a database with many reports of certain importance. basically a report in my DB is one of two types; a Daily Report (requires a single criteria which is the date) and the second is a History report. To view or print a report, I have designed a Filter form to fill in with the report criteria and clicking a button to open the report.The first type (Daily R) work fine without problems. The second type (History R)has a problem. In this report, the criteria are two or three because a history report will retrieve data within a period, so I have to input (FromDate) and (ToDate)and may be adding another criteria which is called a company.In all history reports, the report header will accomodate the two input values of date and extract the rest of report items into the reprot detail area.The problem is, the desigened system doesnot respond well as expected. When I load the filter form to fill in criteria for a history report, I have input the FromDate and ToDate and selected the third criteria (if any), then, the reprot opens without data in it.on the other hand, I tried to load the report directly form opening it, inputing criteria, and it has worked fine without probelms.Would someone expect a key reason for this problem or dirtecly can solve this problem?Appreciate youtr support.Thanks in Advance.mhegazy
Not open for further replies.
1 - 18 of 18 Posts
Do you mean that the report works when opened directly but not from the Form?
Where do you input the Criteria in the query or in the form?
Yes the reports work fine when opened directly, but not opening in case of using the form.

For criteria input, im case of direct opening; in the small window query of thr
So what does it do differently when you open it from the Form?
Yes the reports work fine when opened directly, but not opening in case of using the form.

For criteria input, im case of direct opening; in the small window of the query and in case of the form in the form itself, it has unbound controls for this objective.
Taking into account that; in the later case the query was modified to recieve its criteria from the form; e.g. Forms!hrs_filter!reportdate.

Please ask again if the text is not clear enough.
The Form and Field names should be in square brackets.
You should get the query working first.
I know this And it already exits, it is not the issue
Sorry, but I think it is the issue, the query supplies the report, if the report is not working and it is only displaying the query results what is the query showing?
Dear all,

I have attached copy of the last version of my projects.

You can go to the HRs_Filter form or the DRs_Filter form.

Input the date as for example 12/10/12 or 13/10/12 (means 12-Oct-2012) it will work for the daily reports but not work for the history reports.

You can check this yourself.



See less See more
The period queries are not working.
For some obscure reason the ToDate Field on the Form is not being recognised by the Queries. I have added a new field called Text19 and it is now working.
Also you had the wrong name in the SisterCo query, it is SisterCocombo, not Combo0
See the queries in the attached database.
ps During the testing I dismantled the KCPF_Viscosity_Query_DuringPeriod Query, you will need to use your copy.
It is also not a good idea to use date field named date as that is an Access reserved word for the current date.


Thanks OBP for your support,

I have read your comments and found two queries only out of four working, so I will review all of them again later.

The question now is, why the Form & To fields in all the period reports are not working.

They supposed to have the correct equation with brackets and ! sign like the following:
[Forms]![HRs_Filter]![FromDate] and

Would you please help on this?

See less See more
They are working on the 2 Queries that I modified, the FromDate was working but the ToDate was not.
If you set the Criteria to just equal either date and enter a date in the field it should work for the query to filter the data, but the ToDate returns no records at all.
I think misunderstand my speech.

The two queries you mentioned requiring dates are working andI tried a third one myself and really the probelm is in the date recognition.

What I am asking about is the the From & To fields in the period report itself, they should be filled from the inputs of the FromDate & the new Text19 once the report lunched.

Also, you advised that Date is an access-reserved word and should not be used, I have used FromDate and ToDate (one word) as well as ReportDate in the daily reports filter form.

Do you have another suggession instead.

See less See more
The note about the "Date" was to do with the names of the fields in your tables.
To use the Dates in your Report create 2 unbound fields and use the
as their Control Sources.
Thanks OBP,

Worked very fine in all reports. it was my mistake because the field was lable not a textbox.
Thanks OBP,

Worked very fine, it was my mistake because the field was lable not textbox
Excellent. :up:
1 - 18 of 18 Posts
Not open for further replies.