Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 7
Default Calculated fields in MSQUERY

I am new to query and struggling with a conditional field value. I want to
include the actual amount for a cost type if there is a match or 0 if no
match.
I am trying
IIF(Fieldname = "APP",FIELDNAME2,0)
This works ok in access but I get a 'Column not found message' in query.
Is it not possible to do this or am I missing something?
Grateful for any suggestions
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3,942
Default Calculated fields in MSQUERY

hi
is the data you are drawing into excel from the Access db you mentioned.
if so, you might find it easier to write the query in access and use MSQ to
draw the access query result in to excel. MSQ is good but has some limitation
that access doesn't have. If your have critera, the critera(parameters) MUST
be on the excel side otherwise you will get an error - too few paarameters.
expected x.

regards
FSt1

"PeterW" wrote:

I am new to query and struggling with a conditional field value. I want to
include the actual amount for a cost type if there is a match or 0 if no
match.
I am trying
IIF(Fieldname = "APP",FIELDNAME2,0)
This works ok in access but I get a 'Column not found message' in query.
Is it not possible to do this or am I missing something?
Grateful for any suggestions

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 7
Default Calculated fields in MSQUERY

Thanks - Unfortunateley the data is in a sage database not access. Do you
know if msquery allows this type of calculated field?

"FSt1" wrote:

hi
is the data you are drawing into excel from the Access db you mentioned.
if so, you might find it easier to write the query in access and use MSQ to
draw the access query result in to excel. MSQ is good but has some limitation
that access doesn't have. If your have critera, the critera(parameters) MUST
be on the excel side otherwise you will get an error - too few paarameters.
expected x.

regards
FSt1

"PeterW" wrote:

I am new to query and struggling with a conditional field value. I want to
include the actual amount for a cost type if there is a match or 0 if no
match.
I am trying
IIF(Fieldname = "APP",FIELDNAME2,0)
This works ok in access but I get a 'Column not found message' in query.
Is it not possible to do this or am I missing something?
Grateful for any suggestions

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Problem with Calculated Items on Calculated Fields. rogue_actuary Excel Worksheet Functions 1 March 6th 07 09:29 PM
Help with pivot calculated fields? Acro Excel Discussion (Misc queries) 1 June 15th 06 09:29 PM
Delete All calculated fields nc Excel Discussion (Misc queries) 0 May 17th 06 03:21 PM
Calculated fields nc Excel Discussion (Misc queries) 0 May 9th 06 02:43 PM
Calculated Fields in Pivot xlcharlie Excel Discussion (Misc queries) 0 January 25th 06 09:01 PM


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

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

About Us

"It's about Microsoft Excel"