View Full Version : Query Crashes Database


Phil76
03-19-2007, 02:55 AM
Hi all, please help.

I have created a append query, which runs fine.

But unfornately whenever I try to open this query in design view it crashes the whole Access Database.

This is extremly frustrating as I cannot amend this query, or even check it to remember how it works.

:eek:

I cant see a single question on these forums which, relates to this problem.

Please help if u can!

:confused:

boblarson
03-19-2007, 03:27 AM
Can you import it in to a new database and THEN open it?

Phil76
03-19-2007, 03:46 AM
Thanks Bob, I can, although when i import the table the query is sourced on into a new database also it continues to crash.

I have been looking at other helpsites and now think this query crashes because I have a mildly complex IIF statement to together with a GroupBy.

I am going to take out the IIf statement & apply it to an independant query, to effect the source table before this query is run, so it will just have the GroupBy

wish me luck.

Here is the sql of the query:


INSERT INTO [Europe_Historic_FeeType_Business&Ops] ( [Key], Region, MARKET, AGENT, MAP, [View], FeeType, Volumes, Fees, Rate, [MIS PACK], Entity, [Year], [Month], [Month-Year] )
SELECT [Europe_Historic_Business&OpsPD-ExcludedAgents].Key AS Expr1, [Europe_Historic_Business&OpsPD-ExcludedAgents].Region AS Expr2, [Europe_Historic_Business&OpsPD-ExcludedAgents].MARKET AS Expr3, [Europe_Historic_Business&OpsPD-ExcludedAgents].AGENT AS Expr4, IIf([Europe_Historic_Business&OpsPD-ExcludedAgents]![MAP]="Distressed Debt" Or [Europe_Historic_Business&OpsPD-ExcludedAgents]![MAP]="Asia" Or [Europe_Historic_Business&OpsPD-ExcludedAgents]![MAP]="GCT" Or [Europe_Historic_Business&OpsPD-ExcludedAgents]![MAP]="Emerging Markets - Debt","Non-Equity Allocation",[Europe_Historic_Business&OpsPD-ExcludedAgents]![MAP]) AS MAP, [Europe_Historic_Business&OpsPD-ExcludedAgents].View AS Expr5, "Cancels" AS FeeType, Sum([Europe_Historic_Business&OpsPD-ExcludedAgents].Cancels_Vol) AS SumOfCancels_Vol, Sum([Europe_Historic_Business&OpsPD-ExcludedAgents].Cancels_Fee) AS SumOfCancels_Fee, Sum([Europe_Historic_Business&OpsPD-ExcludedAgents].Implied_Rate) AS SumOfImplied_Rate, [Europe_Historic_Business&OpsPD-ExcludedAgents].[MIS PACK] AS Expr6, [Europe_Historic_Business&OpsPD-ExcludedAgents].Entity AS Expr7, [Europe_Historic_Business&OpsPD-ExcludedAgents].Year AS Expr8, [Europe_Historic_Business&OpsPD-ExcludedAgents].Month AS Expr9, [Europe_Historic_Business&OpsPD-ExcludedAgents].[Month-Year] AS Expr10
FROM [Europe_Historic_Business&OpsPD-ExcludedAgents]
GROUP BY [Europe_Historic_Business&OpsPD-ExcludedAgents].Key, [Europe_Historic_Business&OpsPD-ExcludedAgents].Region, [Europe_Historic_Business&OpsPD-ExcludedAgents].MARKET, [Europe_Historic_Business&OpsPD-ExcludedAgents].AGENT, IIf([Europe_Historic_Business&OpsPD-ExcludedAgents]![MAP]="Distressed Debt" Or [Europe_Historic_Business&OpsPD-ExcludedAgents]![MAP]="Asia" Or [Europe_Historic_Business&OpsPD-ExcludedAgents]![MAP]="GCT" Or [Europe_Historic_Business&OpsPD-ExcludedAgents]![MAP]="Emerging Markets - Debt","Non-Equity Allocation",[Europe_Historic_Business&OpsPD-ExcludedAgents]![MAP]), [Europe_Historic_Business&OpsPD-ExcludedAgents].View, "Cancels", [Europe_Historic_Business&OpsPD-ExcludedAgents].[MIS PACK], [Europe_Historic_Business&OpsPD-ExcludedAgents].Entity, [Europe_Historic_Business&OpsPD-ExcludedAgents].Year, [Europe_Historic_Business&OpsPD-ExcludedAgents].Month, [Europe_Historic_Business&OpsPD-ExcludedAgents].[Month-Year];

boblarson
03-19-2007, 04:06 AM
Yeah, I was just thinking that if you could get it into another database that you would be able to at least view it in design mode.