Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Invalid Operation 2

Status
Not open for further replies.

Sheco

Programmer
Jan 3, 2005
5,457
US
I'm looking at a report is supposed to pull data from a query but is raising an error: "Invalid Operation".

The main query is itself pulling from 2 subqueries.

One of the subqueries prompts the user to enter a date. Running either the main query or the report based off the main query also display the prompt.


PS: This database has been protected or cripled in some fashion such that I cannot see the SQL or do much of anything in design mode... also most everything is missing from the File/Edit/View... menu at the top.
 
If you just run the query (as opposed to the report), do you still get the error?
 
Remou told me to hold the SHIFT key down during startup to enable the design mode and that worked but then I used the wizard to recreate the report and the report it created crashed Access.

So I launched it again with the SHIFT key and all... the new wizard report was still there so I clicked it and got the Invalid Operation same as with the original report.
 
Working in a copy of the report:

I would delete all of the subreports, if there are any, and then run the report. If it works, you know the problem is one of the subreports. Just figure out which one and then try the method below.

If no subreports (or if you determined that the problem is a subreport, do the following with it): I would delete all but one field and try running the report again. If it works, then you know one of the fields is causing the problem. At that point I would start over and first delete half the fields and try run it again. I would continue using a divide-and-conquer technique until I found the offending field.

 
It is a report with one field pulling data from a query with 2 fields. The main query pulls data from two subqueries, lets call them A and B. Subquery A goes against a linked table on an SQL server. Subquery B joins a linked table in a separate MDB to subquery A.

Yuck!

In the name of science, and now that I can get into SQL mode, I rewrote all of this mess into 1 query. It works. Then I made a 1 field report for the query and that works too.

So, that brings up another question... What if I rename the old crazy report and give my new simple report the same name as the old one... will it "replace" the old one for people using this database as an application?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top