473,725 Members | 2,281 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 7251
-----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/AwUBP5WWcoechKq OuFEgEQIMnQCguY tKfYLDW2oL17npk Apu1XUGU88An2ml
YB3MIf8titgL65i vyO79v5N8
=/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******@oldre public.com> wrote in message
news:50******** *************** ***@posting.goo gle.com...
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******@oldre public.com> wrote in message
news:50******** *************** ***@posting.goo gle.com...
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******@oldrep ublic.com (Julia Baresch) wrote in message news:<50******* *************** ****@posting.go ogle.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******@oldre public.com> wrote in message
news:50******** *************** ***@posting.goo gle.com...
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******@oldrep ublic.com (Julia Baresch) wrote in message news:<50******* *************** ****@posting.go ogle.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
2861
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 fields need to match, for that I was able to do the following to get records out of the database (does that make sense?) In (SELECT FROM As Tmp GROUP BY
2
5645
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 TotalQuery based upon SubQuery fields, e.g: Total: + +
1
2702
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 enters the quantity and then the system prints out an invoice for the customer which he/she can then pay. The twist in this one is, rather than the customer paying the invoice in full, the student wants the customer to have the ability to pay off
25
2261
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 front page, click it and read the fulltext. Is there a possibility for mySQL (query) to check if 'fulltext' is empty or not, and only return true or false, so i don't have to put the whole fulltext into the mysql_fetch_array() to decide wether...
3
5208
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 Tmp GROUP BY HAVING Count(*)>1 )
3
2016
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 except that I cannot get it to display entries for projects that have zero issues for that month - so it comes out blank. I'm pretty sure I need a left join (or something like that) for this, but no matter what I try, those zero entries won't...
36
3804
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 to read text or handle arrays of arbitrary length. I don't have the expertise in C of many folks here so I feel like I'm offering a small furry animal for sacrifice to a big armour plated one... but will offer it anyway. Please do suggest...
11
1539
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 somewhat literate in was not acceptable) Simplified these tables look like this: TBL_Data Place number (not unique) Name text (not unique) Reg 1 or 2 Branch 1 or 2 Amount number (not unique)
4
3682
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 with zero's to the left and no decimal. For example: $7.26 becomes 00000000000000726 $24,974.57 becomes 00000000002497457 and so on. Can anyone help with what formula to put into the Update To: section of the query???
0
8889
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9257
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8099
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6702
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6011
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4519
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4784
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
2637
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2157
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 can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.