Graphing an "Other" section in a Pie Graph

  • Thread starter pushrodengine via AccessMonster.com
  • Start date
D

Duane Hookom

What do you get from:

SELECT IsOther, tblIncidentLog.[CallDetail],
Count(tblIncidentLog.CallDetail) AS CountOfCallDetail,
FROM tblIncidentLog JOIN tblDetails ON tblIncidentLog.CallDetail =
tblDetails.CallDetail
WHERE tblIncidentLog.Date Between [Forms].[frmDistrictReport].[Start]
And [Forms].[frmDistrictReport].[End]
GROUP BY IsOther, tblIncidentLog.[CallDetail];


--
Duane Hookom
Microsoft Access MVP


pushrodengine via AccessMonster.com said:
SELECT CallDtl: IIf(IsOther, "Other", tblIncidentLog.[CallDetail]),
Count(tblIncidentLog.CallDetail) AS CountOfCallDetail,
FROM tblIncidentLog JOIN tblDetails ON tblIncidentLog.CallDetail =
tblDetails.CallDetail
WHERE tblIncidentLog.Date Between [Forms].[frmDistrictReport].[Start]
And [Forms].[frmDistrictReport].[End]
GROUP BY IIf(IsOther, "Other", tblIncidentLog.[CallDetail]);


I tried the expression and got another error that reads:

“Syntax error (missing operator) in query expression ‘CallDtl: IIf(IsOther,
“Otherâ€, tblIncidentLog.[CallDetail])’."
 
P

pushrodengine via AccessMonster.com

I get another error:

“The SELECT statement includes a reserved word or an argument name that is
misspelled or missing, or the punctuation is incorrectâ€
 
D

Duane Hookom

Try replace reserved words in your objects. For instance END is a reserved
word. START might also cause issues but probably not here.

Otherwise see what happens if you remove tblDetails.
 
P

pushrodengine via AccessMonster.com

Try replace reserved words in your objects. For instance END is a reserved
word. START might also cause issues but probably not here.

Otherwise see what happens if you remove tblDetails.

No change, same problems.

Thanks
 
D

Duane Hookom

Remove the trailing comma from the SELECT clause:
SELECT CallDtl: IIf(IsOther, "Other", tblIncidentLog.[CallDetail]),
Count(tblIncidentLog.CallDetail) AS CountOfCallDetail
FROM tblIncidentLog JOIN tblDetails ON tblIncidentLog.CallDetail =
tblDetails.CallDetail
WHERE tblIncidentLog.Date Between [Forms].[frmDistrictReport].[Start]
And [Forms].[frmDistrictReport].[End]
GROUP BY IIf(IsOther, "Other", tblIncidentLog.[CallDetail]);
 
P

pushrodengine via AccessMonster.com

I get the following error:

Syntax error (missing operator) in query expression ‘CallDtl: IIf(IsOther,
“Otherâ€, tblIncidentLog.[CallDetail])’.
 
D

Duane Hookom

Could you reply with your full sql statement? Are the quote marks true quotes
or some other variation? Your reply states:
“Otherâ€,
where I would expect:
"Other",
Notice the difference?
 
P

pushrodengine via AccessMonster.com

Notice the difference?

Yes I do. Below is the actual error (the difference is in the font type)

I get the following error:
Syntax error (missing operator) in query expression 'CallDtl: IIf(IsOther,
"Other",tblIncidentLog.[CallDetail])'.
 
D

Duane Hookom

Again:
Could you reply with your full sql statement?

There should be nothing wrong with the expression in your reply. We need to
see it in context.

--
Duane Hookom
Microsoft Access MVP


pushrodengine via AccessMonster.com said:
Notice the difference?

Yes I do. Below is the actual error (the difference is in the font type)

I get the following error:
Syntax error (missing operator) in query expression 'CallDtl: IIf(IsOther,
"Other",tblIncidentLog.[CallDetail])'.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top