A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Running & Setting Up Queries
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Access Crash on Query Save. What do I do?



 
 
Thread Tools Display Modes
  #1  
Old August 18th, 2005, 07:00 PM
LP in TX
external usenet poster
 
Posts: n/a
Default Access Crash on Query Save. What do I do?

Access 2000- I have a query with in Access that has multiple tables linked
(4) with a compound if statement in a criteria feild. Acess will run the
query. When i try to add an additional iif() statement to this criterion
feild and then save (via Save As, Save Icon, or close window and then
warnings message pops up to save) the entire Access aplication crashes. It
will run this query though. Can anyone tell me what i am doing wrong or is
this a known issue (with work arounds?)?
Compound If statement-
Answer: IIf(([REVIEW ACCTS]![CE%]+[REVIEW ACCTS]![EQT%]+[REVIEW
ACCTS]![FI%]+[REVIEW ACCTS]![ALT%]+[REVIEW ACCTS]![RE%])=0,"0",IIf(([REVIEW
ACCTS]![EQT%]/([REVIEW ACCTS]![CE%]+[REVIEW ACCTS]![EQT%]+[REVIEW
ACCTS]![FI%]+[REVIEW ACCTS]![ALT%]+[REVIEW ACCTS]![RE%]))[Code - Investment
Objective]![EQTRANGEHI],"When specialty (alternative) asset is removed from
allocation, account meets asset allocation criteria and guidlines",IIf([Code
- Investment Objective]![INVESTMENT OBJECTIVE] Like "*clos*","Account is
coded as Closing","x")))
Trying to add in an additional iif() statement for "x" at the end of
this string crashes upon save. Furthermore, trying to save the existing
query with this compound if statement crashes the entire application.

Please help...
  #2  
Old August 18th, 2005, 09:05 PM
John Vinson
external usenet poster
 
Posts: n/a
Default

On Thu, 18 Aug 2005 11:00:03 -0700, "LP in TX" LP in
wrote:

Access 2000- I have a query with in Access that has multiple tables linked
(4) with a compound if statement in a criteria feild. Acess will run the
query. When i try to add an additional iif() statement to this criterion
feild and then save (via Save As, Save Icon, or close window and then
warnings message pops up to save) the entire Access aplication crashes. It
will run this query though. Can anyone tell me what i am doing wrong or is
this a known issue (with work arounds?)?
Compound If statement-
Answer: IIf(([REVIEW ACCTS]![CE%]+[REVIEW ACCTS]![EQT%]+[REVIEW
ACCTS]![FI%]+[REVIEW ACCTS]![ALT%]+[REVIEW ACCTS]![RE%])=0,"0",IIf(([REVIEW
ACCTS]![EQT%]/([REVIEW ACCTS]![CE%]+[REVIEW ACCTS]![EQT%]+[REVIEW
ACCTS]![FI%]+[REVIEW ACCTS]![ALT%]+[REVIEW ACCTS]![RE%]))[Code - Investment
Objective]![EQTRANGEHI],"When specialty (alternative) asset is removed from
allocation, account meets asset allocation criteria and guidlines",IIf([Code
- Investment Objective]![INVESTMENT OBJECTIVE] Like "*clos*","Account is
coded as Closing","x")))
Trying to add in an additional iif() statement for "x" at the end of
this string crashes upon save. Furthermore, trying to save the existing
query with this compound if statement crashes the entire application.

Please help...


The expression may just be too long: there is a limit on the length in
bytes of an expression.

You might want to use the simpler (for multiple layers) Switch()
function instead of IIF. See the VBA online help for Switch).

Also, it may be better to use . as a delimiter rather than ! if
[REVIEW ACCTS] is a table or fieldname. In fact, if the fieldnames CE%
and so on are unique within the query, dispense with the [REVIEW
ACCTS] entirely, it's not necessary. This may simplify the expression
enough to let you get by.

John W. Vinson[MVP]
 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Ambiguous Name Error pm Using Forms 10 June 5th, 2005 09:19 PM
What is the difference between 2002 and 2003? Red Sonya General Discussion 2 March 1st, 2005 05:10 AM
Moving from xBase/Clipper [email protected] New Users 1 February 3rd, 2005 07:25 PM
WORD XP mail-merge FAILS using ACCESS Query SueMackay Mailmerge 1 November 23rd, 2004 01:03 PM
Merging MS Word document with MS Access 2002 criteria query Doug Robbins Mailmerge 2 November 4th, 2004 05:57 PM


All times are GMT +1. The time now is 10:53 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.