Advertisement

08.03.2008 at 05:05PM PDT, ID: 23617751
[x]
Attachment Details
[x]
The Solution Rating System

With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.

  • The Grade of the Solution
  • The Zone Rank of the Expert Providing the Solution
  • The Number of Author and Expert Comments
  • The Number of Experts Contributing
  • The Feedback of the Community

Your Input Matters
Because of the way the system is set up, the most important variable in this equation is you. As a member of Experts Exchange, you are able to cast your vote on the quality of the solutions in regard to how complete, accurate, helpful and easy to understand each solution is. When you provide your feedback, each rating is adjusted accordingly. So, if you see a solution that has a poor rating that you think is a good solution, let us know by rating it. As you do, the rating will be adjusted and will become more accurate for other members of our site.

If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support.

Thank you!

8.0

Error message when trying to automate Access

Asked by MattOHPreserve in Microsoft Visual C#.Net, Windows ATL / WTL / COM Programming, .Net Editors & IDEs

Tags: ,

I'm trying to automate the printing of an Access report via a C# app I've written. The application tries to open the Access report via the code below. The report pulls records from a query using the join below, plus the additional 'Step' and 'Outcome' where clauses. This works fine in Access. I can open both the query and view the report directly from Access but trying to do the same thing programmatically causes this "specified field '[Guar_Legal_Status_History].[Step]' could refer to more than one table listed in the FROM clause ". This seems odd since I specified the table and the field in the WHERE clause.

So what the heck could be wrong?

FROM ((Guarantors INNER JOIN
Accounts
ON Guarantors.ID=Accounts.Guarantor_ID) INNER JOIN
Guar_Legal_Status_History
ON Guarantors.ID=Guar_Legal_Status_History.Guarantor_ID) INNER JOIN
Most_Recent_Step
ON Guar_Legal_Status_History.Guarantor_ID=Most_Recent_Step.Guarantor_ID
WHERE Guar_Legal_Status_History.Status_Date=Most_Recent_Step.MaxOfStatus_Date;Start Free Trial
1:
2:
3:
4:
5:
6:
7:
8:
oAccess.DoCmd.OpenReport(
    "Legal Process Approved",
    Access.AcView.acViewNormal,
    oMissing,
    "[Guar_Legal_Status_History].[Step]='" + strStep + "' AND " +
    "[Guar_Legal_Status_History].[Outcome]='" + strOutcome + "'",
    Access.AcWindowMode.acHidden,
    oMissing);
 
Loading Advertisement...
 
[+][-]08.15.2008 at 08:50AM PDT, ID: 22239247

View this solution now by starting your 14-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zones: Microsoft Visual C#.Net, Windows ATL / WTL / COM Programming, .Net Editors & IDEs
Tags: c#, System.Runtime.InteropServices.COMException (0x800A0C07): The specified field '[Guar_Legal_Status_History].[Step]' could refer to more than one table listed in the FROM clause of your SQL statement.
Sign Up Now!
Solution Provided By: bobahop
Participating Experts: 1
Solution Grade: A
 
 
[+][-]09.06.2008 at 07:00PM PDT, ID: 22409761

Experts Exchange has a courteous staff of administrators who help members get the most out of the website by means of administrative comments like this one.

Start your 14-day free trial to view this Administrative Comment or ask the Experts your question.

 
[+][-]09.10.2008 at 09:00PM PDT, ID: 22446223

Experts Exchange has a courteous staff of administrators who help members get the most out of the website by means of administrative comments like this one.

Start your 14-day free trial to view this Administrative Comment or ask the Experts your question.

 
 
Loading Advertisement...
20081112-EE-VQP-43 / EE_QW_2_20070628