Office 2010 SP1 Broke My App

  • Thread starter Thread starter kagard
  • Start date Start date
K

kagard

Greetings:

My report generating code worked yesterday. (It automatically generated 73 reports correctly.) Today, instead of each recipient getting just their information, every report contained everyone's data. The reports still run, but the Where clause isn't being applied. Here's the line of code:

DoCmd.OpenReport ReportName, acViewPreview, , TheWhereClause, acWindowNormal, LevelOfDetail

When I view this in break mode, the ReportName is correct and TheWhereClause contains the right criteria
( [Salesman] = "John Smith" ) for example. Executing this line of code opens the report, but TheWhereClause is not applied and all records are displayed.

I copied the UI (front end) to my boss' computer, which did not have SP1 applied, and everything works fine.

Quarter End reports have to go out tomorrow morning, so this couldn't have happened at a worse time. Does anyone know what is causing this, and what Ican do to work around it?

TIA
Keith
 
I encountered the exact same thing with one of my client's applications (thankfully the only client so far who has Office Updates turned on). So far I've determined that calling a report with criteria from code in a simple form works correctly. When called from a more complex form (in my case containing a at least a tab control), it doesn't work. If you are able to narrow down the conditions causing the issue, please do post your results. I'll do likewise. Microsoft should gear up for a storm over this one.
 
Thanks for the reply, Arvin.

As it turns out, adding this to each report open event procedure:

Dim WhereClause As String
WhereClause = Me.Filter

and this to the end of each report open event procedure:

Me.Filter = WhereClause

makes it work.

I'm not resetting the filter in the body of the procedure, but
something I am setting must, under SP1, cause the Where clause to be
lost or reset.
 
Back
Top