multiple critera for one field in a query

Hi, i am trying to get a count of a certain criteria but in different
columns.

Its hard to explain, but assume i have a table which consists of...

A   550
B   600
C   20
A   100
C   75
B   120
D   390

Then in a query I am trying to have the result of:
         Over 500            Over 100      Over 25      Under 25
A           1                        1
0                 0
B           1                        1
0                 0
C           0                        0
1                 1
D           0                        1
0                 0

The way i have done it was do 4 queries for that criteria, then try
and do a count from those queries.
im just getting myself in a mess.

any help would be greatly appreciated.
0
NPell
1/20/2010 4:23:01 PM
access.queries 6343 articles. 1 followers. Follow

10 Replies
1218 Views

Similar Articles

[PageSpeed] 5

I'm having trouble visualizing the structure of your table ... and "how" 
depends on "what".

That said, have you looked into Access HELP for "cross-tab queries"?

Regards

Jeff Boyce
Microsoft Access MVP

-- 
Disclaimer: This author may have received products and services mentioned
in this post. Mention and/or description of a product or service herein
does not constitute endorsement thereof.

Any code or pseudocode included in this post is offered "as is", with no
guarantee as to suitability.

You can thank the FTC of the USA for making this disclaimer
possible/necessary.

"NPell" <noalenpell@gmail.com> wrote in message 
news:429c7e91-c667-4dce-a0e2-92ede38a5b6a@a32g2000yqm.googlegroups.com...
> Hi, i am trying to get a count of a certain criteria but in different
> columns.
>
> Its hard to explain, but assume i have a table which consists of...
>
> A   550
> B   600
> C   20
> A   100
> C   75
> B   120
> D   390
>
> Then in a query I am trying to have the result of:
>         Over 500            Over 100      Over 25      Under 25
> A           1                        1
> 0                 0
> B           1                        1
> 0                 0
> C           0                        0
> 1                 1
> D           0                        1
> 0                 0
>
> The way i have done it was do 4 queries for that criteria, then try
> and do a count from those queries.
> im just getting myself in a mess.
>
> any help would be greatly appreciated. 


0
Jeff
1/20/2010 4:56:11 PM
On 20 jan, 17:23, NPell <noalenp...@gmail.com> wrote:
> Hi, i am trying to get a count of a certain criteria but in different
> columns.
>
> Its hard to explain, but assume i have a table which consists of...
>
> A =A0 550
> B =A0 600
> C =A0 20
> A =A0 100
> C =A0 75
> B =A0 120
> D =A0 390
>
> Then in a query I am trying to have the result of:
> =A0 =A0 =A0 =A0 =A0Over 500 =A0 =A0 =A0 =A0 =A0 =A0Over 100 =A0 =A0 =A0Ov=
er 25 =A0 =A0 =A0Under 25
> A =A0 =A0 =A0 =A0 =A0 1 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A01
> 0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 0
> B =A0 =A0 =A0 =A0 =A0 1 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A01
> 0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 0
> C =A0 =A0 =A0 =A0 =A0 0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A00
> 1 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 1
> D =A0 =A0 =A0 =A0 =A0 0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A01
> 0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 0
>
> The way i have done it was do 4 queries for that criteria, then try
> and do a count from those queries.
> im just getting myself in a mess.
>
> any help would be greatly appreciated.

Indeed a cross-tab query would be a good solution. If the fields in
your table are named 'code' and 'number', it looks like:

TRANSFORM Nz(Count([Number]),0) AS NumberOfNumber
SELECT [Code]
FROM YourTable
GROUP BY [Code]
PIVOT IIf([Number]>500,"Over 500",IIf([Number]>100,"Over 100",IIf
([Number]>25,"Over 25","Under 25")))


Groeten,

Peter
http://access.xps350.com
0
XPS350
1/20/2010 5:31:41 PM
On 20 Jan, 17:31, XPS350 <xps...@gmail.com> wrote:
> On 20 jan, 17:23, NPell <noalenp...@gmail.com> wrote:
>
>
>
>
>
> > Hi, i am trying to get a count of a certain criteria but in different
> > columns.
>
> > Its hard to explain, but assume i have a table which consists of...
>
> > A =A0 550
> > B =A0 600
> > C =A0 20
> > A =A0 100
> > C =A0 75
> > B =A0 120
> > D =A0 390
>
> > Then in a query I am trying to have the result of:
> > =A0 =A0 =A0 =A0 =A0Over 500 =A0 =A0 =A0 =A0 =A0 =A0Over 100 =A0 =A0 =A0=
Over 25 =A0 =A0 =A0Under 25
> > A =A0 =A0 =A0 =A0 =A0 1 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0=
1
> > 0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 0
> > B =A0 =A0 =A0 =A0 =A0 1 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0=
1
> > 0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 0
> > C =A0 =A0 =A0 =A0 =A0 0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0=
0
> > 1 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 1
> > D =A0 =A0 =A0 =A0 =A0 0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0=
1
> > 0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 0
>
> > The way i have done it was do 4 queries for that criteria, then try
> > and do a count from those queries.
> > im just getting myself in a mess.
>
> > any help would be greatly appreciated.
>
> Indeed a cross-tab query would be a good solution. If the fields in
> your table are named 'code' and 'number', it looks like:
>
> TRANSFORM Nz(Count([Number]),0) AS NumberOfNumber
> SELECT [Code]
> FROM YourTable
> GROUP BY [Code]
> PIVOT IIf([Number]>500,"Over 500",IIf([Number]>100,"Over 100",IIf
> ([Number]>25,"Over 25","Under 25")))
>
> Groeten,
>
> Peterhttp://access.xps350.com- Hide quoted text -
>
> - Show quoted text -

Thanks, i will look into cross-tab queries and get back to you if i
get stuck again.
Appreciate it guys, cheers.
0
NPell
1/21/2010 10:57:39 AM
On 21 Jan, 10:57, NPell <noalenp...@gmail.com> wrote:
> On 20 Jan, 17:31, XPS350 <xps...@gmail.com> wrote:
>
>
>
>
>
> > On 20 jan, 17:23,NPell<noalenp...@gmail.com> wrote:
>
> > > Hi, i am trying to get a count of a certain criteria but in different
> > > columns.
>
> > > Its hard to explain, but assume i have a table which consists of...
>
> > > A =A0 550
> > > B =A0 600
> > > C =A0 20
> > > A =A0 100
> > > C =A0 75
> > > B =A0 120
> > > D =A0 390
>
> > > Then in a query I am trying to have the result of:
> > > =A0 =A0 =A0 =A0 =A0Over 500 =A0 =A0 =A0 =A0 =A0 =A0Over 100 =A0 =A0 =
=A0Over 25 =A0 =A0 =A0Under 25
> > > A =A0 =A0 =A0 =A0 =A0 1 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =
=A01
> > > 0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 0
> > > B =A0 =A0 =A0 =A0 =A0 1 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =
=A01
> > > 0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 0
> > > C =A0 =A0 =A0 =A0 =A0 0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =
=A00
> > > 1 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 1
> > > D =A0 =A0 =A0 =A0 =A0 0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =
=A01
> > > 0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 0
>
> > > The way i have done it was do 4 queries for that criteria, then try
> > > and do a count from those queries.
> > > im just getting myself in a mess.
>
> > > any help would be greatly appreciated.
>
> > Indeed a cross-tab query would be a good solution. If the fields in
> > your table are named 'code' and 'number', it looks like:
>
> > TRANSFORM Nz(Count([Number]),0) AS NumberOfNumber
> > SELECT [Code]
> > FROM YourTable
> > GROUP BY [Code]
> > PIVOT IIf([Number]>500,"Over 500",IIf([Number]>100,"Over 100",IIf
> > ([Number]>25,"Over 25","Under 25")))
>
> > Groeten,
>
> > Peterhttp://access.xps350.com-Hide quoted text -
>
> > - Show quoted text -
>
> Thanks, i will look into cross-tab queries and get back to you if i
> get stuck again.
> Appreciate it guys, cheers.- Hide quoted text -
>
> - Show quoted text -

I think i am getting there with the cross-tab query - can you help me
to refine it, i have:

TRANSFORM Sum([tblData].[Amount]) AS SumOfAmount
SELECT [tblData].[LoggedDate]
FROM tblData
GROUP BY format([tblData].[LoggedDate],"mmm yy")
PIVOT ([tblData].[Amount] In (>=3D50000,between 49999 and
10000,<100000);

I am trying to group the amounts, by month into
- Above =A350,000
- Between =A310,000 and =A349,999
- Less than =A310,000

Can anyone help?

Thanks in advance.
0
NPell
1/21/2010 1:13:37 PM
On 21 Jan, 13:13, NPell <noalenp...@gmail.com> wrote:
> On 21 Jan, 10:57,NPell<noalenp...@gmail.com> wrote:
>
>
>
>
>
> > On 20 Jan, 17:31, XPS350 <xps...@gmail.com> wrote:
>
> > > On 20 jan, 17:23,NPell<noalenp...@gmail.com> wrote:
>
> > > > Hi, i am trying to get a count of a certain criteria but in differe=
nt
> > > > columns.
>
> > > > Its hard to explain, but assume i have a table which consists of...
>
> > > > A =A0 550
> > > > B =A0 600
> > > > C =A0 20
> > > > A =A0 100
> > > > C =A0 75
> > > > B =A0 120
> > > > D =A0 390
>
> > > > Then in a query I am trying to have the result of:
> > > > =A0 =A0 =A0 =A0 =A0Over 500 =A0 =A0 =A0 =A0 =A0 =A0Over 100 =A0 =A0=
 =A0Over 25 =A0 =A0 =A0Under 25
> > > > A =A0 =A0 =A0 =A0 =A0 1 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0=
 =A01
> > > > 0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 0
> > > > B =A0 =A0 =A0 =A0 =A0 1 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0=
 =A01
> > > > 0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 0
> > > > C =A0 =A0 =A0 =A0 =A0 0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0=
 =A00
> > > > 1 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 1
> > > > D =A0 =A0 =A0 =A0 =A0 0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0=
 =A01
> > > > 0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 0
>
> > > > The way i have done it was do 4 queries for that criteria, then try
> > > > and do a count from those queries.
> > > > im just getting myself in a mess.
>
> > > > any help would be greatly appreciated.
>
> > > Indeed a cross-tab query would be a good solution. If the fields in
> > > your table are named 'code' and 'number', it looks like:
>
> > > TRANSFORM Nz(Count([Number]),0) AS NumberOfNumber
> > > SELECT [Code]
> > > FROM YourTable
> > > GROUP BY [Code]
> > > PIVOT IIf([Number]>500,"Over 500",IIf([Number]>100,"Over 100",IIf
> > > ([Number]>25,"Over 25","Under 25")))
>
> > > Groeten,
>
> > > Peterhttp://access.xps350.com-Hidequoted text -
>
> > > - Show quoted text -
>
> > Thanks, i will look into cross-tab queries and get back to you if i
> > get stuck again.
> > Appreciate it guys, cheers.- Hide quoted text -
>
> > - Show quoted text -
>
> I think i am getting there with the cross-tab query - can you help me
> to refine it, i have:
>
> TRANSFORM Sum([tblData].[Amount]) AS SumOfAmount
> SELECT [tblData].[LoggedDate]
> FROM tblData
> GROUP BY format([tblData].[LoggedDate],"mmm yy")
> PIVOT ([tblData].[Amount] In (>=3D50000,between 49999 and
> 10000,<100000);
>
> I am trying to group the amounts, by month into
> - Above =A350,000
> - Between =A310,000 and =A349,999
> - Less than =A310,000
>
> Can anyone help?
>
> Thanks in advance.- Hide quoted text -
>
> - Show quoted text -

Sorry, i used some of Peters (XPS350) suggestion, and came up with:

TRANSFORM Sum([tblData].[Amount]) AS SumOfAmount
SELECT [tblData].[LoggedDate]
FROM tblData
GROUP BY format([tblData].[LoggedDate],"mmm yy")
PIVOT IIf([Amount]>500,"Over 500",IIf([Amount]>100,"Over 100",IIf
([Amount]>25,"Over 25","Under 25")))

But, access is telling me "You tried to execute a query that does not
include the specified expression "LoggedDate" as part of an aggregate
function."
0
NPell
1/21/2010 1:18:34 PM
On 21 Jan, 13:18, NPell <noalenp...@gmail.com> wrote:
> On 21 Jan, 13:13,NPell<noalenp...@gmail.com> wrote:
>
>
>
>
>
> > On 21 Jan, 10:57,NPell<noalenp...@gmail.com> wrote:
>
> > > On 20 Jan, 17:31, XPS350 <xps...@gmail.com> wrote:
>
> > > > On 20 jan, 17:23,NPell<noalenp...@gmail.com> wrote:
>
> > > > > Hi, i am trying to get a count of a certain criteria but in diffe=
rent
> > > > > columns.
>
> > > > > Its hard to explain, but assume i have a table which consists of.=
...
>
> > > > > A =A0 550
> > > > > B =A0 600
> > > > > C =A0 20
> > > > > A =A0 100
> > > > > C =A0 75
> > > > > B =A0 120
> > > > > D =A0 390
>
> > > > > Then in a query I am trying to have the result of:
> > > > > =A0 =A0 =A0 =A0 =A0Over 500 =A0 =A0 =A0 =A0 =A0 =A0Over 100 =A0 =
=A0 =A0Over 25 =A0 =A0 =A0Under 25
> > > > > A =A0 =A0 =A0 =A0 =A0 1 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =
=A0 =A01
> > > > > 0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 0
> > > > > B =A0 =A0 =A0 =A0 =A0 1 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =
=A0 =A01
> > > > > 0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 0
> > > > > C =A0 =A0 =A0 =A0 =A0 0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =
=A0 =A00
> > > > > 1 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 1
> > > > > D =A0 =A0 =A0 =A0 =A0 0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =
=A0 =A01
> > > > > 0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 0
>
> > > > > The way i have done it was do 4 queries for that criteria, then t=
ry
> > > > > and do a count from those queries.
> > > > > im just getting myself in a mess.
>
> > > > > any help would be greatly appreciated.
>
> > > > Indeed a cross-tab query would be a good solution. If the fields in
> > > > your table are named 'code' and 'number', it looks like:
>
> > > > TRANSFORM Nz(Count([Number]),0) AS NumberOfNumber
> > > > SELECT [Code]
> > > > FROM YourTable
> > > > GROUP BY [Code]
> > > > PIVOT IIf([Number]>500,"Over 500",IIf([Number]>100,"Over 100",IIf
> > > > ([Number]>25,"Over 25","Under 25")))
>
> > > > Groeten,
>
> > > > Peterhttp://access.xps350.com-Hidequotedtext -
>
> > > > - Show quoted text -
>
> > > Thanks, i will look into cross-tab queries and get back to you if i
> > > get stuck again.
> > > Appreciate it guys, cheers.- Hide quoted text -
>
> > > - Show quoted text -
>
> > I think i am getting there with the cross-tab query - can you help me
> > to refine it, i have:
>
> > TRANSFORM Sum([tblData].[Amount]) AS SumOfAmount
> > SELECT [tblData].[LoggedDate]
> > FROM tblData
> > GROUP BY format([tblData].[LoggedDate],"mmm yy")
> > PIVOT ([tblData].[Amount] In (>=3D50000,between 49999 and
> > 10000,<100000);
>
> > I am trying to group the amounts, by month into
> > - Above =A350,000
> > - Between =A310,000 and =A349,999
> > - Less than =A310,000
>
> > Can anyone help?
>
> > Thanks in advance.- Hide quoted text -
>
> > - Show quoted text -
>
> Sorry, i used some of Peters (XPS350) suggestion, and came up with:
>
> TRANSFORM Sum([tblData].[Amount]) AS SumOfAmount
> SELECT [tblData].[LoggedDate]
> FROM tblData
> GROUP BY format([tblData].[LoggedDate],"mmm yy")
> PIVOT IIf([Amount]>500,"Over 500",IIf([Amount]>100,"Over 100",IIf
> ([Amount]>25,"Over 25","Under 25")))
>
> But, access is telling me "You tried to execute a query that does not
> include the specified expression "LoggedDate" as part of an aggregate
> function."- Hide quoted text -
>
> - Show quoted text -

I realise that im just spamming this - unintentionally - but i have
the solution.
Using the help provided here, and just trial and error :

TRANSFORM Count(tblData.Amount) AS CountOfAmount
SELECT Format([tblData].[LoggedDate],"mmm yy") AS [Month]
FROM tblData
GROUP BY Format([tblData].[LoggedDate],"mmm yy"), Year([LoggedDate]),
Month([LoggedDate])
ORDER BY Year([LoggedDate]), Month([LoggedDate])
PIVOT IIf([Amount] >50000,"Over =A350000",IIf([Amount]>10000,"Over
=A310000",IIf([Amount]>2500,"Over =A32500","Under =A32500")));

Thanks everyone :)
0
NPell
1/21/2010 2:33:58 PM
On 21 jan, 14:18, NPell <noalenp...@gmail.com> wrote:
> On 21 Jan, 13:13, NPell <noalenp...@gmail.com> wrote:
>
>
>
> > On 21 Jan, 10:57,NPell<noalenp...@gmail.com> wrote:
>
> > > On 20 Jan, 17:31, XPS350 <xps...@gmail.com> wrote:
>
> > > > On 20 jan, 17:23,NPell<noalenp...@gmail.com> wrote:
>
> > > > > Hi, i am trying to get a count of a certain criteria but in diffe=
rent
> > > > > columns.
>
> > > > > Its hard to explain, but assume i have a table which consists of.=
...
>
> > > > > A =A0 550
> > > > > B =A0 600
> > > > > C =A0 20
> > > > > A =A0 100
> > > > > C =A0 75
> > > > > B =A0 120
> > > > > D =A0 390
>
> > > > > Then in a query I am trying to have the result of:
> > > > > =A0 =A0 =A0 =A0 =A0Over 500 =A0 =A0 =A0 =A0 =A0 =A0Over 100 =A0 =
=A0 =A0Over 25 =A0 =A0 =A0Under 25
> > > > > A =A0 =A0 =A0 =A0 =A0 1 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =
=A0 =A01
> > > > > 0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 0
> > > > > B =A0 =A0 =A0 =A0 =A0 1 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =
=A0 =A01
> > > > > 0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 0
> > > > > C =A0 =A0 =A0 =A0 =A0 0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =
=A0 =A00
> > > > > 1 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 1
> > > > > D =A0 =A0 =A0 =A0 =A0 0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =
=A0 =A01
> > > > > 0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 0
>
> > > > > The way i have done it was do 4 queries for that criteria, then t=
ry
> > > > > and do a count from those queries.
> > > > > im just getting myself in a mess.
>
> > > > > any help would be greatly appreciated.
>
> > > > Indeed a cross-tab query would be a good solution. If the fields in
> > > > your table are named 'code' and 'number', it looks like:
>
> > > > TRANSFORM Nz(Count([Number]),0) AS NumberOfNumber
> > > > SELECT [Code]
> > > > FROM YourTable
> > > > GROUP BY [Code]
> > > > PIVOT IIf([Number]>500,"Over 500",IIf([Number]>100,"Over 100",IIf
> > > > ([Number]>25,"Over 25","Under 25")))
>
> > > > Groeten,
>
> > > > Peterhttp://access.xps350.com-Hidequotedtext -
>
> > > > - Show quoted text -
>
> > > Thanks, i will look into cross-tab queries and get back to you if i
> > > get stuck again.
> > > Appreciate it guys, cheers.- Hide quoted text -
>
> > > - Show quoted text -
>
> > I think i am getting there with the cross-tab query - can you help me
> > to refine it, i have:
>
> > TRANSFORM Sum([tblData].[Amount]) AS SumOfAmount
> > SELECT [tblData].[LoggedDate]
> > FROM tblData
> > GROUP BY format([tblData].[LoggedDate],"mmm yy")
> > PIVOT ([tblData].[Amount] In (>=3D50000,between 49999 and
> > 10000,<100000);
>
> > I am trying to group the amounts, by month into
> > - Above =A350,000
> > - Between =A310,000 and =A349,999
> > - Less than =A310,000
>
> > Can anyone help?
>
> > Thanks in advance.- Hide quoted text -
>
> > - Show quoted text -
>
> Sorry, i used some of Peters (XPS350) suggestion, and came up with:
>
> TRANSFORM Sum([tblData].[Amount]) AS SumOfAmount
> SELECT [tblData].[LoggedDate]
> FROM tblData
> GROUP BY format([tblData].[LoggedDate],"mmm yy")
> PIVOT IIf([Amount]>500,"Over 500",IIf([Amount]>100,"Over 100",IIf
> ([Amount]>25,"Over 25","Under 25")))
>
> But, access is telling me "You tried to execute a query that does not
> include the specified expression "LoggedDate" as part of an aggregate
> function."

Please post the structure of your tabel and tell us what you want
referring to fieldnames of that table.

Note that in your first post it looked like you wanted to count
records. Now you have a sum in your query.


Groeten,

Peter
http://access.xps350.com

0
XPS350
1/21/2010 2:55:02 PM
On 21 Jan, 14:55, XPS350 <xps...@gmail.com> wrote:
> On 21 jan, 14:18, NPell <noalenp...@gmail.com> wrote:
>
>
>
>
>
> > On 21 Jan, 13:13, NPell <noalenp...@gmail.com> wrote:
>
> > > On 21 Jan, 10:57,NPell<noalenp...@gmail.com> wrote:
>
> > > > On 20 Jan, 17:31, XPS350 <xps...@gmail.com> wrote:
>
> > > > > On 20 jan, 17:23,NPell<noalenp...@gmail.com> wrote:
>
> > > > > > Hi, i am trying to get a count of a certain criteria but in dif=
ferent
> > > > > > columns.
>
> > > > > > Its hard to explain, but assume i have a table which consists o=
f...
>
> > > > > > A =A0 550
> > > > > > B =A0 600
> > > > > > C =A0 20
> > > > > > A =A0 100
> > > > > > C =A0 75
> > > > > > B =A0 120
> > > > > > D =A0 390
>
> > > > > > Then in a query I am trying to have the result of:
> > > > > > =A0 =A0 =A0 =A0 =A0Over 500 =A0 =A0 =A0 =A0 =A0 =A0Over 100 =A0=
 =A0 =A0Over 25 =A0 =A0 =A0Under 25
> > > > > > A =A0 =A0 =A0 =A0 =A0 1 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0=
 =A0 =A01
> > > > > > 0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 0
> > > > > > B =A0 =A0 =A0 =A0 =A0 1 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0=
 =A0 =A01
> > > > > > 0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 0
> > > > > > C =A0 =A0 =A0 =A0 =A0 0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0=
 =A0 =A00
> > > > > > 1 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 1
> > > > > > D =A0 =A0 =A0 =A0 =A0 0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0=
 =A0 =A01
> > > > > > 0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 0
>
> > > > > > The way i have done it was do 4 queries for that criteria, then=
 try
> > > > > > and do a count from those queries.
> > > > > > im just getting myself in a mess.
>
> > > > > > any help would be greatly appreciated.
>
> > > > > Indeed a cross-tab query would be a good solution. If the fields =
in
> > > > > your table are named 'code' and 'number', it looks like:
>
> > > > > TRANSFORM Nz(Count([Number]),0) AS NumberOfNumber
> > > > > SELECT [Code]
> > > > > FROM YourTable
> > > > > GROUP BY [Code]
> > > > > PIVOT IIf([Number]>500,"Over 500",IIf([Number]>100,"Over 100",IIf
> > > > > ([Number]>25,"Over 25","Under 25")))
>
> > > > > Groeten,
>
> > > > > Peterhttp://access.xps350.com-Hidequotedtext-
>
> > > > > - Show quoted text -
>
> > > > Thanks, i will look into cross-tab queries and get back to you if i
> > > > get stuck again.
> > > > Appreciate it guys, cheers.- Hide quoted text -
>
> > > > - Show quoted text -
>
> > > I think i am getting there with the cross-tab query - can you help me
> > > to refine it, i have:
>
> > > TRANSFORM Sum([tblData].[Amount]) AS SumOfAmount
> > > SELECT [tblData].[LoggedDate]
> > > FROM tblData
> > > GROUP BY format([tblData].[LoggedDate],"mmm yy")
> > > PIVOT ([tblData].[Amount] In (>=3D50000,between 49999 and
> > > 10000,<100000);
>
> > > I am trying to group the amounts, by month into
> > > - Above =A350,000
> > > - Between =A310,000 and =A349,999
> > > - Less than =A310,000
>
> > > Can anyone help?
>
> > > Thanks in advance.- Hide quoted text -
>
> > > - Show quoted text -
>
> > Sorry, i used some of Peters (XPS350) suggestion, and came up with:
>
> > TRANSFORM Sum([tblData].[Amount]) AS SumOfAmount
> > SELECT [tblData].[LoggedDate]
> > FROM tblData
> > GROUP BY format([tblData].[LoggedDate],"mmm yy")
> > PIVOT IIf([Amount]>500,"Over 500",IIf([Amount]>100,"Over 100",IIf
> > ([Amount]>25,"Over 25","Under 25")))
>
> > But, access is telling me "You tried to execute a query that does not
> > include the specified expression "LoggedDate" as part of an aggregate
> > function."
>
> Please post the structure of your tabel and tell us what you want
> referring to fieldnames of that table.
>
> Note that in your first post it looked like you wanted to count
> records. Now you have a sum in your query.
>
> Groeten,
>
> Peterhttp://access.xps350.com- Hide quoted text -
>
> - Show quoted text -

Yeah i was working with an example from the internet too (so it was
broken down and i could understand it, as its my first cross-tab
query).
Your code really helped though.

I was wondering, if the criteria is not met and all entries result to
a count of zero - the column does not show, is there anyway to make it
show regardless?
Thanks in advance.
0
NPell
1/21/2010 3:22:01 PM
On 21 Jan, 15:22, NPell <noalenp...@gmail.com> wrote:
> On 21 Jan, 14:55, XPS350 <xps...@gmail.com> wrote:
>
>
>
>
>
> > On 21 jan, 14:18, NPell <noalenp...@gmail.com> wrote:
>
> > > On 21 Jan, 13:13, NPell <noalenp...@gmail.com> wrote:
>
> > > > On 21 Jan, 10:57,NPell<noalenp...@gmail.com> wrote:
>
> > > > > On 20 Jan, 17:31, XPS350 <xps...@gmail.com> wrote:
>
> > > > > > On 20 jan, 17:23,NPell<noalenp...@gmail.com> wrote:
>
> > > > > > > Hi, i am trying to get a count of a certain criteria but in d=
ifferent
> > > > > > > columns.
>
> > > > > > > Its hard to explain, but assume i have a table which consists=
 of...
>
> > > > > > > A =A0 550
> > > > > > > B =A0 600
> > > > > > > C =A0 20
> > > > > > > A =A0 100
> > > > > > > C =A0 75
> > > > > > > B =A0 120
> > > > > > > D =A0 390
>
> > > > > > > Then in a query I am trying to have the result of:
> > > > > > > =A0 =A0 =A0 =A0 =A0Over 500 =A0 =A0 =A0 =A0 =A0 =A0Over 100 =
=A0 =A0 =A0Over 25 =A0 =A0 =A0Under 25
> > > > > > > A =A0 =A0 =A0 =A0 =A0 1 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =
=A0 =A0 =A01
> > > > > > > 0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 0
> > > > > > > B =A0 =A0 =A0 =A0 =A0 1 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =
=A0 =A0 =A01
> > > > > > > 0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 0
> > > > > > > C =A0 =A0 =A0 =A0 =A0 0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =
=A0 =A0 =A00
> > > > > > > 1 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 1
> > > > > > > D =A0 =A0 =A0 =A0 =A0 0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =
=A0 =A0 =A01
> > > > > > > 0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 0
>
> > > > > > > The way i have done it was do 4 queries for that criteria, th=
en try
> > > > > > > and do a count from those queries.
> > > > > > > im just getting myself in a mess.
>
> > > > > > > any help would be greatly appreciated.
>
> > > > > > Indeed a cross-tab query would be a good solution. If the field=
s in
> > > > > > your table are named 'code' and 'number', it looks like:
>
> > > > > > TRANSFORM Nz(Count([Number]),0) AS NumberOfNumber
> > > > > > SELECT [Code]
> > > > > > FROM YourTable
> > > > > > GROUP BY [Code]
> > > > > > PIVOT IIf([Number]>500,"Over 500",IIf([Number]>100,"Over 100",I=
If
> > > > > > ([Number]>25,"Over 25","Under 25")))
>
> > > > > > Groeten,
>
> > > > > > Peterhttp://access.xps350.com-Hidequotedtext-
>
> > > > > > - Show quoted text -
>
> > > > > Thanks, i will look into cross-tab queries and get back to you if=
 i
> > > > > get stuck again.
> > > > > Appreciate it guys, cheers.- Hide quoted text -
>
> > > > > - Show quoted text -
>
> > > > I think i am getting there with the cross-tab query - can you help =
me
> > > > to refine it, i have:
>
> > > > TRANSFORM Sum([tblData].[Amount]) AS SumOfAmount
> > > > SELECT [tblData].[LoggedDate]
> > > > FROM tblData
> > > > GROUP BY format([tblData].[LoggedDate],"mmm yy")
> > > > PIVOT ([tblData].[Amount] In (>=3D50000,between 49999 and
> > > > 10000,<100000);
>
> > > > I am trying to group the amounts, by month into
> > > > - Above =A350,000
> > > > - Between =A310,000 and =A349,999
> > > > - Less than =A310,000
>
> > > > Can anyone help?
>
> > > > Thanks in advance.- Hide quoted text -
>
> > > > - Show quoted text -
>
> > > Sorry, i used some of Peters (XPS350) suggestion, and came up with:
>
> > > TRANSFORM Sum([tblData].[Amount]) AS SumOfAmount
> > > SELECT [tblData].[LoggedDate]
> > > FROM tblData
> > > GROUP BY format([tblData].[LoggedDate],"mmm yy")
> > > PIVOT IIf([Amount]>500,"Over 500",IIf([Amount]>100,"Over 100",IIf
> > > ([Amount]>25,"Over 25","Under 25")))
>
> > > But, access is telling me "You tried to execute a query that does not
> > > include the specified expression "LoggedDate" as part of an aggregate
> > > function."
>
> > Please post the structure of your tabel and tell us what you want
> > referring to fieldnames of that table.
>
> > Note that in your first post it looked like you wanted to count
> > records. Now you have a sum in your query.
>
> > Groeten,
>
> > Peterhttp://access.xps350.com-Hide quoted text -
>
> > - Show quoted text -
>
> Yeah i was working with an example from the internet too (so it was
> broken down and i could understand it, as its my first cross-tab
> query).
> Your code really helped though.
>
> I was wondering, if the criteria is not met and all entries result to
> a count of zero - the column does not show, is there anyway to make it
> show regardless?
> Thanks in advance.- Hide quoted text -
>
> - Show quoted text -

Found out how... (For anyone that searches this forum)...
Design View > Properties > Column Headings:
"Over =A350000","Over =A310000","Over =A32500","Under =A32500"
Match them up to the headings in the SQL query.

Thanks again to Peter and Jeff
0
NPell
1/21/2010 3:40:52 PM
"NPell" <noalenpell@gmail.com> wrote in message 
news:c3e640cb-a8e2-43b3-bda1-132aac5e44eb@r24g2000yqd.googlegroups.com...
On 20 Jan, 17:31, XPS350 <xps...@gmail.com> wrote:
> On 20 jan, 17:23, NPell <noalenp...@gmail.com> wrote:
>
>
>
>
>
> > Hi, i am trying to get a count of a certain criteria but in different
> > columns.
>
> > Its hard to explain, but assume i have a table which consists of...
>
> > A 550
> > B 600
> > C 20
> > A 100
> > C 75
> > B 120
> > D 390
>
> > Then in a query I am trying to have the result of:
> > Over 500 Over 100 Over 25 Under 25
> > A 1 1
> > 0 0
> > B 1 1
> > 0 0
> > C 0 0
> > 1 1
> > D 0 1
> > 0 0
>
> > The way i have done it was do 4 queries for that criteria, then try
> > and do a count from those queries.
> > im just getting myself in a mess.
>
> > any help would be greatly appreciated.
>
> Indeed a cross-tab query would be a good solution. If the fields in
> your table are named 'code' and 'number', it looks like:
>
> TRANSFORM Nz(Count([Number]),0) AS NumberOfNumber
> SELECT [Code]
> FROM YourTable
> GROUP BY [Code]
> PIVOT IIf([Number]>500,"Over 500",IIf([Number]>100,"Over 100",IIf
> ([Number]>25,"Over 25","Under 25")))
>
> Groeten,
>
> Peterhttp://access.xps350.com- Hide quoted text -
>
> - Show quoted text -

Thanks, i will look into cross-tab queries and get back to you if i
get stuck again.
Appreciate it guys, cheers. 


0
Zac
1/25/2010 2:17:31 AM
Reply:

Similar Artilces:

compute one of two missing value?
I want to create a table like this: column A is the name of the person column B is height in feet column C is height in meters How do I set it up so that if I enter a number in the feet column, excel would calculate and fill in the meter column, and if I fill in the meter column, excel would calculate and fill in the feet column? use a worksheet_change event if target.column=2 then target.offset(,1)=target*_____ if target.column=3 then target.offset(,-1)=target/_____ -- Don Guillett Microsoft MVP Excel SalesAid Software dguillett@gmail.com "james" <nospa...

Removing multiple hyperlinks
I've got data copied into my spreadsheet that includes hyperlinks. Ther are thousands of these in a column. I can remove individually by right-clicking and selecting Hyperlink an Remove. I can then arrow down and do a control Y, cell by cell, What I want to do is highlight the column and be able tp remove th hyperlinks all at once. I've exhausted myself peering through knowlegebases and groups, bu cannot find any way to make this work. Thanks for any input you can provide -- Message posted from http://www.ExcelForum.com Hi one way: Use the following macro to remove hyperlinks...

Create a list with multiple criteria
I have a data base with 1,000's of addresses w/zipcodes (Sheet 1 columns A to E, E being zipcodes). After setting a base address I get all of the zipcodes within a given radius (in this case 70 zipcodes), listed in Sheet 2, Column A. Next, I use COUNTIF (in column B) to find how many addresses are in each zipcode, in this example there are 46 addresses within the 70 zipcodes. What I want to do is create a list in sheet three that will list each with the data from Sheet 1 columns A to E). Any help would be appreciated. Ronbo ...

Charting multiple multiples
Hopefully I can explain this in a way that will be understood. Data: Place A Place B Place C FWD Back FWD BACK FWD Back Org_1 1 2 3 2 1 3 Org_2 2 5 4 6 1 4 I would like to place the data so that FWD and Back data is stacked on top of each other in different colors, and placed in one row on a 3-D chart as Org-1 and a second row as Org_2. Any ideas? Thanks. If you arrange your data like this: Back FWD Org_1 Place A 2 1 Place B 2 3 Place C 3 1 Org_2 Place A 5 2 ...

Multiple Hyperlinks In Same Shape Doesn't Work
Can anyone tell me how I can get multiple hyperlinks in the same shape to work? I have no problem inserting the hyperlinks, but they all point to only one. I scoured these posts, and found this (http://groups.google.com/groups?q=hyperlink+group:microsoft.public.visio.*&hl=en&lr=&ie=UTF-8&oe=UTF-8&group=microsoft.public.visio.*&selm=3eea6467%241%40news.microsoft.com&rnum=2), which doesn't appear to work. Thanks in advance-- RAD Um, which version of Visio are you using? As far as I know, at least Visio 2002 and Visio 2003 support multiple hyperlinks. Can't...

Date in the query is always short date
I want to capture the LONG date from a query, so I create a parameter for the date (mm ddd yy) . In its properties, it's format is long date, BUT it always shows up the short date. WHY? Dates are stored as decimal number counting days from 12/31/1899 midnight with time as the decimal fraction of a day. Formats are just different ways to display the information. So you got to set the format. In design view of the query click the field of the grid that has the datetime field, right click, scroll down and select Properties. Click 'Format' and then in the pull down...

Multiple Profiles, multiple accounts, multiple machine configuring?
Is there a vb or related method of adding *both* profiles *and* email accounts to multiple users logins from the administrator account? I have a network which is a workgroup (NOT a domain), in which there are about 15 users that are replicated on each of 5 machines. I'd like to be able to add all 15 Mail Profiles, and all 15 email accounts to each of the 15 logins on these 5 machines--obviously with as little work as possible. The mail is all retrieved from the same Exchange Server, but these machines *cannot* be added to a domain (don't ask!). I'd hate to have to log into ...

distributing data into multiple cells
hii i have to prepare an exel sheet of some 2000 products..i have to copy d data from the net and then prepare the sheet,with 4 different columns for 4 diff types of entries..now when i copy data nad paste is as text.it all goes in a single cell in a row .how can i distribute the data l into multiple cells????????? -- jaspreet ------------------------------------------------------------------------ jaspreet's Profile: http://www.excelforum.com/member.php?action=getinfo&userid=23821 View this thread: http://www.excelforum.com/showthread.php?threadid=374772 can you show some samp...

Single click selects multiple cells
When clicking on a single cell multiple cells are selected. The one time solution for this is to zoom in or out. This is problematic as 60% seems to be the zoom that works most of the time but at this zoom level the cell contents do not display. The time lost and the frustration that builds is killing my productivity and office attitude. Please give all of us a permanet fix. -- Thanks Mike ---------------- This post is a suggestion for Microsoft, and Microsoft responds to the suggestions with the most votes. To vote for this suggestion, click the "I Agree" butt...

GPS Coordinates Field
Good day, Seems like default addresses have a longitude and latitude field within MSCRM 1.2. Unfortunately a float data type has been configured which does not allow for modification. The format of a coordinate would be something like Of course we could enter our own custom field but with MS Map Point being a future consideration we would like leverage from this by using captured data in the correct format... Depending on accuracy required we could have values such as Redmond being 47-40'27.32 The only allowable format wraps the numerical value entered into something in the fashion o...

Is there a way to sort multiple columns with a tab or something?
I have a 4 column spreadsheet. I want to be able to click the heading for each of the columns to hav them sort by that column if clicked. How do I do that -- Message posted from http://www.ExcelForum.com Hi why not used the soprt icon for this. Note: This could screw up your sorting if Excel does not recognize your database columns correctly -- Regards Frank Kabel Frankfurt, Germany > I have a 4 column spreadsheet. > > I want to be able to click the heading for each of the columns to have > them sort by that column if clicked. How do I do that? > > > --- > Mess...

Need help building query
I'm not that familiar to Access and would appreciate some help building the following SQL query. I have two tables, and if two categories match within the tables, then I would like a third category entry updated to the first table. 1st Table: Working 2nd Table: Original Categories (columns) that should match between table 1 and 2: Pt Acct # Charge Cd If the entires for a line match, then update: Lawson # (take from Original table and enter into line for Working table) So, basically if the (Pt Acct #) AND (Charge Cd) in the (Original) table match the (Pt Acct #) AND (Charge Cd) in...

Sending to multiple addresses
How do I send an email to multiple addresses having only the recipient see their own email address? Michelle wrote: > How do I send an email to multiple addresses having only > the recipient see their own email address? Put the addresses into the BCC: field. Note that many e-mail programs will decide such mails are spam though. >-----Original Message----- >How do I send an email to multiple addresses having only >the recipient see their own email address? >. Open your new email and go to tools, select recipient, when your address book opens select (highlight) the a...

Convert data into one WrapText cell
User's data is as follows: G Data......................... 4 no 5 20 more Data ............... etc where G through 20 is in a single row, and therefore Data occupies 3 rows. I believe this gives me a complete record where the Data occupies more than one row: Sub TestConvertToWrapText() Dim Cell As Range, StartRw As Long Dim EndRw As Long For Each Cell In ActiveSheet.Range("B2:B33") If Not IsEmpty(Cell) Then StartRw = Cell.Row If Not IsEmpty(Cell.Offset(1, 0)) Then EndRw = Cell.End(xlDown).Row...

Windows will not "Tile" when one of them has Money Plus open
I've discovered that I cannot get my windows to "Tile" when using Money Plus. This is a big bummer because that is how I update my 401k account (not on any exchange so I must do it manually) I copy/paste info into it (money) and it is so much easier if I can tile windows. I used to do it all the time with my older MM Deluxe 2004. Funny thing is that the Money window tiles but the other one acts just like when you click "Tile Windows" when there is only one open... "bupkiss" just a 'bleep' and back to fully maxed... any ideas? On Wed, 5 Sep 2...

Some basic reporting fields
1. Daily Sales by register, the register number field was "filter value invalid" why is this when i am putting in the right register number? 2. How can i pull a daily sales but when i try to input a date in the date field, it is not giving me that particular date? It is saying that a numeric field is required. I put in it as 10/21/2005 and this is the format, so i do not understand why this is happening? 3. In the detail sales report, every item is listed even if that item is sold 10 times, it shows up 10 times, how can i get a summary of the detail sales. The summary sales rep...

Exchange 2000 Distribution Lists
Hello We are running an Exchange 2000 environment in Exchange Native Mode and Windows Mixed Mode. We just converted from Exchange 5.5 Is there any way to configure multiple people to be owners or editors of the distribution lists? This was possible in 5.5, but we cannot find a means of accomplishing this in 2000 Any help would be appreciated Thank yo Jason "Jason P.S." <jason.pruden-shebaylo@investorsgroup.com> wrote: >We are running an Exchange 2000 environment in Exchange Native Mode and Windows Mixed Mode. We just converted from Exchange 5.5. > >Is there any w...

multiple selection
How can I select multiple records into a list box? I want that for append identical records (for select records) in another table. Many thanks Florin Use a subform instead of a list box. In a subform bound to a related table, you can append as many rows as applicable. It is possible (but not simple) to use an unbound multi-select list box that is populated in the Current event of the form, and executes Append, Delete, and Update query statements based on the ItemsSelected if they are changed. You will also have to find a way to respond to the user "undoing" changes. -- Al...

Need to have a dropdown list containing multiple rows
I am setting up an form and need to create a dropdown list that will contain 8 sets of data. Each set needs to contain 3 rows of data (name, street address & city/state/zip. The goal is to allow the user to click onto the cell, see the dropdown and select which address set to use. This would then place the data into three rows suitable for mailing. I have never attempted anything like this and am in need of assistance. Thank you. --- Message posted from http://www.ExcelForum.com/ Pat What you ask is easily done using Data Validation drop-down list and a few Vlookups but........Ex...

Multiple domains #6
Hi, Having done some research I have found that it is possible to send and receive email from multiple domains with Exchange 2003. I have a few questions that I would like cleared up if anyone can help. 1. Is it really as simple as configuring a recipient policy for the new domain and then changing the mail record for that domain to point to the proper IP address? 2. If I set up a new account in AD, and need this account to be associated with the second email domain, will the default SMTP email be for the first domain? If so, can I just edit this directly? 3. If I set the default SMTP add...

Combine multiple tables into one
I took over a database in which the last person created a new table for everyday worth of data (ie. Feb-21-08 is named 022108). There are over 100 tables in the single database with the same columns and table attributes, I would like to combine all of these tables into one where I have a Date_Key field in place of the table name. I figured out how to query the table names using the following: SELECT MSysObjects.Name FROM MsysObjects WHERE (Left$([Name],1)<>"~") AND (Left$([Name],4) <> "Msys") AND (MSysObjects.Type)=1 ORDER BY MSysObjects.Name; Now I j...

Help Regarding an update query
Hi, iam trying to run an update query. the situation is as follows, i have linked excel sheets in my table. so i am using the update query to update all the records that i have them in my access tables. i tried this before many times and i was successful in doing that. But in some tables, it gave me an error message "Type mismatch in expression". i checked each and every field in my access table and in the excel sheets and they are all with the correct format. any help?? any ideas? On Fri, 31 Aug 2007 08:47:16 -0700, Samer <samoora44@gmail.com> wrote: >Hi, iam trying to r...

forwarding mail to multiple external addresses
I have a user on our Exchange Server 2003 that wants his email to be forwarded to 2 different external email addresses and not have the original mail stored in his exchange mailbox at all. I can set this up to froward to only one external email address by creating a contact in Active Directory with an external email address and then forwarding to that contact. However, it won't allow me to forward to multiple contacts. Please help as this seems like a pretty common request from several users. I'm not sure, as I haven't tested it before, but you might be able to create a ...

Update Query in VBA
Hello, I am using Access 2003. I am trying to run an update query through VBA. My SQL is this: UPDATE CostSummarySheet SET CostSummarySheet.Active = Forms!fsubLOA!Active WHERE (((CostSummarySheet.Proj_Name)=[Forms]![frmCSSheetEdit]![Proj_Name])); and the code I am attempting to use is this: Dim db As DAO.Database Dim strSql As String strSql = "UPDATE CostSummarySheet SET [Active] = [Forms]![frmCSSheetEdit]![fsubLOA]![Active] WHERE [Proj_Name]= [Forms]![frmCSSheetEdit]![Proj_Name];" Set db = DBEngine(0)(0) db.Execute strSql, dbFailOnError ...

Finding Data in multiple worksheets
Using Excel 2000, how can I find data in multiple worksheets; example: any number between 200 & 299 in 32 worksheets? If you mean you want to find a single number across 32 worksheets, group your worksheets (click on the first, ctrl-click on subsequent (or even shift-click)). Then Edit|Find But I think I'd use Jan Karel Pieterse's FlexFind: http://www.oaltd.co.uk/MVP/ If you meant you wanted to find all 100 numbers (200-299) in all 32 sheets, then I think I'd have a macro search for each number and report the results on a new worksheet. "mark@southwestconst.com&quo...