PDA

View Full Version : Report's RecordSource



vosmerkin
09-07-2007, 05:19 AM
I have a form that opens my Reports Form. Reports Form opens about 15 reports. There are problems with some of them.
At first the RecordSource was constant for the reports, like this
SELECT PNAME, GROUP_NAME, sum(Expr1004) as SS from qryCollection where RCPT_ID not in(select RCPT_ID from TBL_RCPT_CANCEL) group by PNAME,GROUP_NAMEReport was starting with this command
Call DoCmd.OpenReport("rptCollection_Userwise_Receiptwise", acViewPreview, , strFilter, acDialog)where
strFilter = "DATE_RCPT BETWEEN #09-06-06# AND #09-06-07# AND TIME_RCPT BETWEEN #07:00# AND #20:00#"
or
strFilter = "DATE_RCPT BETWEEN #09-06-06# AND #09-06-07# AND TIME_RCPT BETWEEN #07:00# AND #20:00# AND USER_ID='Admin' AND ACTIVITY_GROUP='Library' "

At first everything worked perfectly, but some day strFilter stoped changing contents of the report. When entering strFilter to the Filter field of Report's properties - again no results.
I started changing RecordSource property of the report. On my PC everything works fine (Office2003), but on clients PC Access crashes on chabging RecordSource of the report.

All this happens with about 5-7 of 15 reports. I can't see any logic in it
Pleas help

vosmerkin
09-10-2007, 07:57 PM
Now I've got results when entering strFilter to the Filter field of Report's properties, but still no results opening with Docmd.OpenReport :(