Filter negative and positive currency....

V

Vince

Hi,

I would like to know how to filter all negative numbers
and all positive numbers into two groups respectably.

The field is currency.

What would the query criteria be?

THanks,

Vince
 
F

Fredg

Vince,

SELECT IIf([ANumber]<0,[ANumber],"") AS Exp1, IIf([ANumber]>0,[ANumber],"")
AS Exp2
FROM YourTable;
 
F

Fredg

Open the query in Design View.
Add a new column to the query:
Exp1: IIf([ANumber]>0,[ANumber],"")

Add another column to the query:
Exp2: IIf([ANumber]<0,[ANumber],"")

Run the query, access will create the SQL.

Change [ANumber] to whatever the actual name is of the Field.
If you want a more useful field name, change Exp1 and Exp2 to whatever you
wish.
--
Fred

Please reply only to this newsgroup.
I do not reply to personal e-mail.


Vince said:
Hi Fred,

Thanks again, but where do I put this? Sorry newbie at
codes...

I am pulling the total form a query thus how do I satisfy
your "FROM YourTable;" ?

It comes from multiple tables?

Thanks again!!!!

Vince
-----Original Message-----
Vince,

SELECT IIf([ANumber]<0,[ANumber],"") AS Exp1, IIf ([ANumber]>0,[ANumber],"")
AS Exp2
FROM YourTable;


--
Fred

Please reply only to this newsgroup.
I do not reply to personal e-mail.


Vince said:
Hi,

I would like to know how to filter all negative numbers
and all positive numbers into two groups respectably.

The field is currency.

What would the query criteria be?

THanks,

Vince


.
 
V

Vince

Hi Fred,

Thanks A LOT...your amazing, I will work hard to learn
this code after this bloddy project is complete.

VInce
-----Original Message-----
Open the query in Design View.
Add a new column to the query:
Exp1: IIf([ANumber]>0,[ANumber],"")

Add another column to the query:
Exp2: IIf([ANumber]<0,[ANumber],"")

Run the query, access will create the SQL.

Change [ANumber] to whatever the actual name is of the Field.
If you want a more useful field name, change Exp1 and Exp2 to whatever you
wish.
--
Fred

Please reply only to this newsgroup.
I do not reply to personal e-mail.


Vince said:
Hi Fred,

Thanks again, but where do I put this? Sorry newbie at
codes...

I am pulling the total form a query thus how do I satisfy
your "FROM YourTable;" ?

It comes from multiple tables?

Thanks again!!!!

Vince
-----Original Message-----
Vince,

SELECT IIf([ANumber]<0,[ANumber],"") AS Exp1, IIf ([ANumber]>0,[ANumber],"")
AS Exp2
FROM YourTable;


--
Fred

Please reply only to this newsgroup.
I do not reply to personal e-mail.


Hi,

I would like to know how to filter all negative numbers
and all positive numbers into two groups respectably.

The field is currency.

What would the query criteria be?

THanks,

Vince


.


.
 
H

HSalim

After the project is complete?!
What good is that? And will it ever happen?

IF you want to learn it at all, why not before the project is complete?
Your project will certainly benefit from it - hopefully you will avoid a lot
of the really bad mistakes that come from not knowing better,
and the project won't seem so bloddy.

just my opinion...

HS

Vince said:
Hi Fred,

Thanks A LOT...your amazing, I will work hard to learn
this code after this bloddy project is complete.

VInce
-----Original Message-----
Open the query in Design View.
Add a new column to the query:
Exp1: IIf([ANumber]>0,[ANumber],"")

Add another column to the query:
Exp2: IIf([ANumber]<0,[ANumber],"")

Run the query, access will create the SQL.

Change [ANumber] to whatever the actual name is of the Field.
If you want a more useful field name, change Exp1 and Exp2 to whatever you
wish.
--
Fred

Please reply only to this newsgroup.
I do not reply to personal e-mail.


Vince said:
Hi Fred,

Thanks again, but where do I put this? Sorry newbie at
codes...

I am pulling the total form a query thus how do I satisfy
your "FROM YourTable;" ?

It comes from multiple tables?

Thanks again!!!!

Vince
-----Original Message-----
Vince,

SELECT IIf([ANumber]<0,[ANumber],"") AS Exp1, IIf
([ANumber]>0,[ANumber],"")
AS Exp2
FROM YourTable;


--
Fred

Please reply only to this newsgroup.
I do not reply to personal e-mail.


Hi,

I would like to know how to filter all negative numbers
and all positive numbers into two groups respectably.

The field is currency.

What would the query criteria be?

THanks,

Vince


.


.
 

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