IIf statement in Make-Table Query

  • Thread starter Thread starter Brenda
  • Start date Start date
B

Brenda

Good morning all...

I am trying to create a make table query that will place
rows of data into a table with columns of data so that I
can create a 6 month report. I have a table with all of
the data in it, in row format. From that I have a Query,
which sums the data so that I'm working with totals. When
the user starts the Query, they are prompted to enter the
beginning month, year, and cost center and from that I
pull in 6 months of data which is placed into rows.

I have an additional query, which is the make table query,
from which I am pulling data from the Query above. I am
trying to get each month in individual columns of data to
create the report.

I have this as my IIf statement, which is giving me
errors...

Month1: IIf(([Conversion])=(([begin_month])+([begin_year]
*12)),[SumofACTUAL],0)

From this I am getting an error that says I've "tried to
execute a query that does not include the specified
expression (expression here) as part of an aggregate
function".

Any ideas?

TIA,
Brenda
 
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Without your SQL view I'm just guessing:

Place the IIf(([Conversion]... (etc.) statement in the GROUP BY clause.
On the QBE grid select Group By on the Total row of the Month1 column.

--
MGFoster:::mgf00 <at> earthlink <decimal-point> net
Oakland, CA (USA)

-----BEGIN PGP SIGNATURE-----
Version: PGP for Personal Privacy 5.0
Charset: noconv

iQA/AwUBQUnSkoechKqOuFEgEQIHwQCgoCKWCtzTiPYO/jWyslX65y2jmIoAn1pE
YjHmnw2W6MmXs1sxPPptBHFW
=Yc7I
-----END PGP SIGNATURE-----
 
Back
Top