473,513 Members | 2,266 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Query won't pull amounts less than zero

Hi everyone, I haven't found any reference to this problem on this
group or in Access 97 help. I hope someone here knows this - probably
a simple thing, but not obvious.

I designed a query to pull payment data from my database for
accounting. It has 3 tables with one-to-many joins:

Table1 --> one-to-many --> Table2 --> one-to-many --> Table3

The payment amount field is in Table3. I entered a few negative
numbers in this field for payment checks that have been returned and
voided. The field is currency data type, and it took the negative
entries and displays them with () like this ($500.00).

When I run the query with the payment field criteria set to <>0, it
won't pull the records with negative amounts. I tried it with <0 and
with no criteria, and it still won't pull these records.

I also tried making a copy of the table and the query for
experimentation and changing the data type to Long Integer with
currency format. It still won't pull the records with negative
amounts.

Can anyone tell me why these records won't pull and how to fix it?

Thank you very much!

Julia
Nov 12 '05 #1
5 7217
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Can't really tell what's wrong without your SQL query.

Have you queried Table3 by itself - like this:

SELECT Payment
FROM Table3
WHERE Payment <= 0

If that works then its the criteria/joins to the other tables that are
excluding the negative payments. We'd have to know the SQL query and
some more info on how your tables are designed before we could give
better answers.

- --
MGFoster:::mgf
Oakland, CA (USA)

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

iQA/AwUBP5WWcoechKqOuFEgEQIMnQCguYtKfYLDW2oL17npkApu1X UGU88An2ml
YB3MIf8titgL65ivyO79v5N8
=/1lB
-----END PGP SIGNATURE-----

Julia Baresch wrote:
Hi everyone, I haven't found any reference to this problem on this
group or in Access 97 help. I hope someone here knows this - probably
a simple thing, but not obvious.

I designed a query to pull payment data from my database for
accounting. It has 3 tables with one-to-many joins:

Table1 --> one-to-many --> Table2 --> one-to-many --> Table3

The payment amount field is in Table3. I entered a few negative
numbers in this field for payment checks that have been returned and
voided. The field is currency data type, and it took the negative
entries and displays them with () like this ($500.00).

When I run the query with the payment field criteria set to <>0, it
won't pull the records with negative amounts. I tried it with <0 and
with no criteria, and it still won't pull these records.

I also tried making a copy of the table and the query for
experimentation and changing the data type to Long Integer with
currency format. It still won't pull the records with negative
amounts.

Can anyone tell me why these records won't pull and how to fix it?

Thank you very much!

Julia


Nov 12 '05 #2

"Julia Baresch" <jb******@oldrepublic.com> wrote in message
news:50**************************@posting.google.c om...
Hi everyone, I haven't found any reference to this problem on this
group or in Access 97 help. I hope someone here knows this - probably
a simple thing, but not obvious.

I designed a query to pull payment data from my database for
accounting. It has 3 tables with one-to-many joins:

Table1 --> one-to-many --> Table2 --> one-to-many --> Table3

The payment amount field is in Table3. I entered a few negative
numbers in this field for payment checks that have been returned and
voided. The field is currency data type, and it took the negative
entries and displays them with () like this ($500.00).

When I run the query with the payment field criteria set to <>0, it
won't pull the records with negative amounts. I tried it with <0 and
with no criteria, and it still won't pull these records.

I also tried making a copy of the table and the query for
experimentation and changing the data type to Long Integer with
currency format. It still won't pull the records with negative
amounts.

Can anyone tell me why these records won't pull and how to fix it?

Thank you very much!

Julia


Is it possible that the negative amounts have been entered as ($500.00)
instead of -500?

Doug M
Nov 12 '05 #3
Thanks, I hadn't tried using just the one table. I will. I know the
amounts were entered as -500 because I entered them just before I did
this. We'll see what happens.

Thanks again :-)

"Doug M" <ow***@nowhere.com> wrote in message news:<3f***********************@news.optusnet.com. au>...
"Julia Baresch" <jb******@oldrepublic.com> wrote in message
news:50**************************@posting.google.c om...
Hi everyone, I haven't found any reference to this problem on this
group or in Access 97 help. I hope someone here knows this - probably
a simple thing, but not obvious.

I designed a query to pull payment data from my database for
accounting. It has 3 tables with one-to-many joins:

Table1 --> one-to-many --> Table2 --> one-to-many --> Table3

The payment amount field is in Table3. I entered a few negative
numbers in this field for payment checks that have been returned and
voided. The field is currency data type, and it took the negative
entries and displays them with () like this ($500.00).

When I run the query with the payment field criteria set to <>0, it
won't pull the records with negative amounts. I tried it with <0 and
with no criteria, and it still won't pull these records.

I also tried making a copy of the table and the query for
experimentation and changing the data type to Long Integer with
currency format. It still won't pull the records with negative
amounts.

Can anyone tell me why these records won't pull and how to fix it?

Thank you very much!

Julia


Is it possible that the negative amounts have been entered as ($500.00)
instead of -500?

Doug M

Nov 12 '05 #4
I figured out what was causing this - it won't pull negatives in a
field set to currency format. I used my copy of table and form and
changed the format to Long Integer with Standard format, and then it
pulled negatives with no problem.

However, in the meantime I realized if we enter negatives in my
database it will throw off the totals, so we're not going to do that.

Thanks again for your help :-)

Julia

jb******@oldrepublic.com (Julia Baresch) wrote in message news:<50**************************@posting.google. com>...
Thanks, I hadn't tried using just the one table. I will. I know the
amounts were entered as -500 because I entered them just before I did
this. We'll see what happens.

Thanks again :-)

"Doug M" <ow***@nowhere.com> wrote in message news:<3f***********************@news.optusnet.com. au>...
"Julia Baresch" <jb******@oldrepublic.com> wrote in message
news:50**************************@posting.google.c om...
Hi everyone, I haven't found any reference to this problem on this
group or in Access 97 help. I hope someone here knows this - probably
a simple thing, but not obvious.

I designed a query to pull payment data from my database for
accounting. It has 3 tables with one-to-many joins:

Table1 --> one-to-many --> Table2 --> one-to-many --> Table3

The payment amount field is in Table3. I entered a few negative
numbers in this field for payment checks that have been returned and
voided. The field is currency data type, and it took the negative
entries and displays them with () like this ($500.00).

When I run the query with the payment field criteria set to <>0, it
won't pull the records with negative amounts. I tried it with <0 and
with no criteria, and it still won't pull these records.

I also tried making a copy of the table and the query for
experimentation and changing the data type to Long Integer with
currency format. It still won't pull the records with negative
amounts.

Can anyone tell me why these records won't pull and how to fix it?

Thank you very much!

Julia


Is it possible that the negative amounts have been entered as ($500.00)
instead of -500?

Doug M

Nov 12 '05 #5
We decided to enter negatives in one special case, so I addressed this
again. I found when I changed the format of my payment field to
Standard from Currency, it wipes out or rounds everything to the right
of the decimal. Luckily I had remembered to make a backup copy of the
table! Further research shows the only way to have accurate decimal
numbers is to use the currency format. The other formats are either
no fractions, or use floating point calc.

I changed everything back to currency, and now the negative number
pulls in the query when it didn't before. The only difference is in
my query, field, and form the decimals are set to 2 places now instead
of auto. I'm not sure why it works now when it didn't before. Maybe
I used the wrong criteria when I tested it.

I posted this to help anyone else who runs into this problem, in case
you're wondering.

Cheers,
Julia :-)

jb******@oldrepublic.com (Julia Baresch) wrote in message news:<50**************************@posting.google. com>...
I figured out what was causing this - it won't pull negatives in a
field set to currency format. I used my copy of table and form and
changed the format to Long Integer with Standard format, and then it
pulled negatives with no problem.

However, in the meantime I realized if we enter negatives in my
database it will throw off the totals, so we're not going to do that.

Thanks again for your help :-)

Julia

Nov 12 '05 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
2848
by: C White | last post by:
Hi I am having problems with running a query that does the following there are 5 fields in a table that the query is based on, the first four are simple enough and all that happens is that the...
2
5636
by: phaddock4 | last post by:
Please help. GOAL: I hope to calculate a total amount in a TotalQuery (or field in the SubQuery?), based upon three field amounts in a SubQuery. STATUS: When I create an expression in the...
1
2698
by: Declan Barry | last post by:
Hi all.. I have a query from one of our students regarding an order invoice payment database. The student can make up the order database okay where a customer picks a number of products and...
25
2214
by: frizzle | last post by:
Hi there, I have a mySQL system with a news publishing part in it: Admins can create new items with text in it, and they have an option to create 'fulltexts', so you'd get "read more ..." on the...
3
5194
by: skennd | last post by:
Here's my problem in exact replication: I have used the find duplicate query in Access, and the query determined the following duplicate values by the following query: In (SELECT FROM As...
3
2010
by: JCCDEVEL | last post by:
Hello, I'm writing a basic query in Sql Server Mgmt Studio 2005. Basically, I'm trying to query a table to get all "issues" reported in a month by "Project Category". The query is working fine...
36
3762
by: James Harris | last post by:
Initial issue: read in an arbitrary-length piece of text. Perceived issue: handle variable-length data The code below is a suggestion for implementing a variable length buffer that could be used...
11
1526
by: termitebe | last post by:
Hi being the only (somewhat) computerliterate person in my department I have inherited an access 2000 Db wich contains 2 tables: (strangely reporting that access is not one of the programs I am...
4
3674
by: ckpoll2 | last post by:
I'm trying to figure out how to get an update query to work. I need to get dollar amounts into standard lengths and formats for export into our main system. The dollar amounts need to be 17 digits...
0
7171
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7388
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7545
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
7539
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
1
5095
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4751
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3228
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
807
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
461
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.