There's no such thing as a stupid question, but they're the easiest to answer.
JoinTour
Login
Search
Business Applications
Tag Cloud
access acer asus bios bsod computer crash dns drive driver drivers error ethernet excel freeze games gaming graphics hard drive hardware hdmi internet java laptop malware memory monitor motherboard network printer problem ram random registry router slow software sound trojan usb video virus vista wifi windows windows 7 windows 7 32 bit windows 7 64 bit windows xp wireless
Search
Search for:
Tech Support Guy Forums > Software & Hardware > Business Applications >
Solved: problem with access 2003 calculation comparing values

Reply  
Thread Tools
haychj's Avatar
Junior Member with 2 posts.
 
Join Date: Sep 2009
Experience: Intermediate
29-Sep-2009, 09:30 PM #1
Solved: problem with access 2003 calculation comparing values
I have an Access 2003 table (Table1) with four fields:
Amount (number, single format, 3 decimal places)
Add (number, single format, 3 decimal places)
Calc (number, single format, 3 decimal places)
Test (number, single format, 3 decimal places)

There is one record:
Amount=40
Add=1.021
Calc=40.84
Test=

The first query updates the "Test" field by [Amount]*[Add] with the result that the test field now contains the value 40.84

Then I run a query to find records where [Test]<>[Calc] and it returns the record even though the values in the two fields are equal.

Help! Please???
zhouma's Avatar
Member with 115 posts.
 
Join Date: Aug 2009
29-Sep-2009, 10:42 PM #2
What does the record say when you run the 2nd query?

When I run the second query, I get a 0 for the first record (using the info you listed). I added in a few records of my own and got -1. If I'm not mistaken the 0 means False/No and the -1 means True/Yes. So the 0 means that no records match [Test]<>[Calc] and the -1 means that records match [Test]<>[Calc].

Either way please explain more so I can get a better handle on what you are looking for.

Best,
Zhouma
OBP's Avatar
OBP OBP is online now
Computer Specs
Distinguished Member with 14,665 posts.
 
Join Date: Mar 2005
Location: UK
Experience: An old Basic Programmer
30-Sep-2009, 12:53 PM #3
haychj, welcome to the forum.
When I do the test query using [Test]<>[Calc] I do not get any records. If I change to [Test]=[Calc] I get the one record returned.
See the attached database.
Attached Files
File Type: zip calc.zip (8.9 KB, 8 views)
haychj's Avatar
Junior Member with 2 posts.
 
Join Date: Sep 2009
Experience: Intermediate
30-Sep-2009, 01:24 PM #4
The value I get in the test field is 40.4799995422...! I may have found the answer. When I change the number format to Double with the dacimals as Auto I get the correct result. Thanks!
Reply

Tags
access, calculation, databases

THIS THREAD HAS EXPIRED.
Are you having the same problem? We have volunteers ready to answer your question, but first you'll have to join for free. Need help getting started? Check out our Welcome Guide.

Search Tech Support Guy

Find the solution to your
computer problem!




Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
WELCOME TO TECH SUPPORT GUY! Are you looking for the solution to your computer problem? Join our site today to ask your question -- for free! Our site is run completely by volunteers who want to help you solve your computer problems. See our Welcome Guide to get started.
Thread Tools



Facebook Facebook Twitter Twitter TechGuy.tv TechGuy.tv Mobile TSG Mobile
You Are Using:
Server ID
Advertisements do not imply our endorsement of that product or service.
All times are GMT -4. The time now is 01:44 PM.
Copyright © 1996 - 2011 TechGuy, Inc. All rights reserved.

Powered by Cermak Technologies, Inc.