A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Setting Up & Running Reports
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Report Criteria



 
 
Thread Tools Display Modes
  #1  
Old July 25th, 2007, 10:50 PM posted to microsoft.public.access.reports
Hong
external usenet poster
 
Posts: 62
Default Report Criteria

Hello, I created a report by chart wizard. and the chart is good.
And I also created a form for enter date range: "BeginningDate" and
"EndingDate".
But when I set the event in report property it doesnt' work.
It doesn't open the form for me to enter the date range.

If I delete the event, it opens the "Enter parameter value", and I can enter
the date range, but I can't put the text on the report header?

What is the problem?


  #2  
Old July 25th, 2007, 11:04 PM posted to microsoft.public.access.reports
fredg
external usenet poster
 
Posts: 4,386
Default Report Criteria


"Hong" wrote in message
...
Hello, I created a report by chart wizard. and the chart is good.
And I also created a form for enter date range: "BeginningDate" and
"EndingDate".
But when I set the event in report property it doesnt' work.
It doesn't open the form for me to enter the date range.

If I delete the event, it opens the "Enter parameter value", and I can

enter
the date range, but I can't put the text on the report header?

What is the problem?



Regarding: But when I set the event in report property it doesnt' work.
It doesn't open the form for me to enter the date range.

Is there any reason why you did not post your actual event code.
You have your report in front of you, we don't!

Fred


  #3  
Old July 26th, 2007, 05:03 AM posted to microsoft.public.access.reports
Larry Linson
external usenet poster
 
Posts: 3,112
Default Report Criteria


"Hong" wrote

Hello, I created a report by chart wizard. and
the chart is good. And I also created a form for
enter date range: "BeginningDate" and
"EndingDate". But when I set the event in report
property it doesnt' work. It doesn't open the form
for me to enter the date range.

If I delete the event, it opens the "Enter parameter
value", and I can enter the date range, but I can't
put the text on the report header?


(1) Generally, I open the Report from a Command Button on the Form, after
the user enters the values for the criteria, using a DoCmd.OpenReport
statement. I do not Open the Form from the Report. It _can_ be done in the
manner you describe, but I find the other approach much easier and more
convenient.

(2) If it is asking for a parameter, then you are using a parameter query.
Using a parameter query from code doesn't always work the way you expect.
Thus, I use a Query that has no Criteria, and supply the Criteria in the
WhereCondition argument of the DoCmd.OpenReport that is in the VBA code that
runs in the Click event of the Command Button described in (1), above.

(3) An alternative, with the latest few releases of Access is that you pass
a WHERE clause in the OpenArgs argument of the DoCmd.OpenReport, then
retrieve that, concatenate it with the base Query to replace the
RecordSource in the Report's Open event. (In earlier releases of Access,
OpenArgs was only supported for Forms.)

And, as fredg points out, if you want people to assist you in debugging your
code, you not only have to give them the details about where and how you use
it, but you need to provide it. We are only equipped to answer technical
questions, not to do a mind-link to know what you are talking about and then
answer the technical questions -- Sorry.

Larry Linson
Microsoft Access MVP



 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 11:50 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.