Error 3125

lawtonl

Registered User.
Local time
Today, 07:23
Joined
Nov 3, 2009
Messages
28
Hello!

I'm using Access 2007. I had a query that worked fine a few days ago. I had to change a few things this morning and I now get Error 3125 "Reports - Campaign " is not a valid name. I've tried changing the name and it still has the same issue regardless of what the query is called.

I've had a search around and I can't find anything that solves this issue for me and so here I am.

Here's the SQL for the query:

Code:
SELECT dbo_FilteredCampaign.name AS [Campaign Name], dbo_FilteredCampaign.actualstart AS [Campaign Start Date], dbo_FilteredCampaign.totalactualcost AS [Total Cost], IIf([Stage 7 - Connected] Is Null,0,[Stage 7 - Connected])-IIf([totalactualcost] Is Null,0,[totalactualcost]) AS ROI, IIf([Lost] Is Null,0,[lost])+IIf([Stage 3 - Proposal] Is Null,0,[Stage 3 - Proposal])+IIf([Stage 4 - Negotiation & Contract Signing] Is Null,0,[Stage 4 - Negotiation & Contract Signing])+IIf([Stage 5 - Commercial Received Paperwork] Is Null,0,[Stage 5 - Commercial Received Paperwork])+IIf([Stage 6 - A.I.T. Received Paperwork] Is Null,0,[Stage 6 - A.I.T. Received Paperwork])+IIf([Stage 7 - Connected] Is Null,0,[Stage 7 - Connected]) AS [Total Opportuntity GP], IIf([prospect counts]![CountOfFirstOfPotential Customer1] Is Null,0,[prospect counts]![CountOfFirstOfPotential Customer1]) AS [Total Prospects], IIf([prospect counts]![Lost] Is Null,0,[prospect counts]![Lost]) AS [Prospects Lost], IIf([prospect counts]![open] Is Null,0,[prospect counts]![open]) AS [Prospects Open], IIf([prospect counts]![won] Is Null,0,[prospect counts]![won]) AS [Prospects Won], Format([Drop Off Percent],"Percent") AS [Drop Off %], [Prospect Values Crosstab].[Lost], [Prospect Values Crosstab].[Stage 3 - Proposal], [Prospect Values Crosstab].[Stage 4 - Negotiation & Contract Signing], [Prospect Values Crosstab].[Stage 5 - Commercial Received Paperwork], [Prospect Values Crosstab].[Stage 6 - A_I_T_ Received Paperwork], [Prospect Values Crosstab].[Stage 7 - Connected], "Campaigns" AS [Activity Type]
FROM ([Prospect Values Crosstab] RIGHT JOIN dbo_FilteredCampaign ON [Prospect Values Crosstab].campaignid=dbo_FilteredCampaign.campaignid) LEFT JOIN (Percentages RIGHT JOIN [Prospect Counts] ON Percentages.campaignid=[Prospect Counts].campaignid) ON [Prospect Values Crosstab].campaignid=[Prospect Counts].campaignid
WHERE (((dbo_FilteredCampaign.actualstart)>#1/1/2010#))
GROUP BY dbo_FilteredCampaign.name, dbo_FilteredCampaign.actualstart, dbo_FilteredCampaign.totalactualcost, IIf([Stage 7 - Connected] Is Null,0,[Stage 7 - Connected])-IIf([totalactualcost] Is Null,0,[totalactualcost]), IIf([Lost] Is Null,0,[lost])+IIf([Stage 3 - Proposal] Is Null,0,[Stage 3 - Proposal])+IIf([Stage 4 - Negotiation & Contract Signing] Is Null,0,[Stage 4 - Negotiation & Contract Signing])+IIf([Stage 5 - Commercial Received Paperwork] Is Null,0,[Stage 5 - Commercial Received Paperwork])+IIf([Stage 6 - A.I.T. Received Paperwork] Is Null,0,[Stage 6 - A.I.T. Received Paperwork])+IIf([Stage 7 - Connected] Is Null,0,[Stage 7 - Connected]), IIf([prospect counts]![CountOfFirstOfPotential Customer1] Is Null,0,[prospect counts]![CountOfFirstOfPotential Customer1]), IIf([prospect counts]![Lost] Is Null,0,[prospect counts]![Lost]), IIf([prospect counts]![open] Is Null,0,[prospect counts]![open]), IIf([prospect counts]![won] Is Null,0,[prospect counts]![won]), Format([Drop Off Percent],"Percent"), [Prospect Values Crosstab].Lost, [Prospect Values Crosstab].[Stage 3 - Proposal], [Prospect Values Crosstab].[Stage 4 - Negotiation & Contract Signing], [Prospect Values Crosstab].[Stage 5 - Commercial Received Paperwork], [Prospect Values Crosstab].[Stage 6 - A_I_T_ Received Paperwork], [Prospect Values Crosstab].[Stage 7 - Connected], "Campaigns", dbo_FilteredCampaign.campaignid, dbo_FilteredCampaign.actualstart
HAVING (((dbo_FilteredCampaign.name) Not Like "Event*" And (dbo_FilteredCampaign.name) Not Like "web Lead*" And (dbo_FilteredCampaign.name)<>"ITTS T/M Leads" And (dbo_FilteredCampaign.name)<>"SCI Sales Group Leads" And (dbo_FilteredCampaign.name)<>"Pearlfinders" And (dbo_FilteredCampaign.name)<>"Email: Customer Notifications" And (dbo_FilteredCampaign.name)<>"Test Campaign: Check Ma" And (dbo_FilteredCampaign.name)<>"Email: Business Bulletins" And (dbo_FilteredCampaign.name)<>"Teleleads" And (dbo_FilteredCampaign.name)<>"TM: GCL" And (dbo_FilteredCampaign.name)<>"TM: Tangible Results" And (dbo_FilteredCampaign.name)<>"TM: The Telemarketing Company" And (dbo_FilteredCampaign.name)<>"TM: Gasbox" And (dbo_FilteredCampaign.name)<>"TM: SMART"))
ORDER BY dbo_FilteredCampaign.actualstart DESC , dbo_FilteredCampaign.actualstart DESC;


Any ideas what's wrong here?
tia!
 

Users who are viewing this thread

Back
Top Bottom