Mourning the loss of our friend, WhitPhil.
There's no such thing as a stupid question, but they're the easiest to answer.
JoinTour
Login
Search
 
Business Applications
Tag Cloud
access audio black screen blue screen boot bsod connection crash dell desktop drivers dvd email error excel excel 2003 firefox hard drive hardware hijackthis internet keyboard laptop malware monitor motherboard network networking outlook problem processor recovery router safe mode screen slow sound spyware tdlwsp.dll trojan upgrade video virus vista vundo windows windows 7 windows vista windows xp wireless
Search
Search for:
Tech Support Guy Forums > Software & Hardware > Business Applications >
Solved: problem with access 2003 calculation comparing values

Tip: Click here to scan for System Errors and Optimize PC performance
[ Sponsored Link ]

Closed Thread
 
Thread Tools
haychj's Avatar
Junior Member with 2 posts.
 
Join Date: Sep 2009
Experience: Intermediate
29-Sep-2009, 08: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 52 posts.
 
Join Date: Aug 2009
29-Sep-2009, 09: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 offline
Computer Specs
Distinguished Member with 9,339 posts.
 
Join Date: Mar 2005
Location: UK
Experience: An old Basic Programmer
30-Sep-2009, 11:53 AM #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, 3 views)
haychj's Avatar
Junior Member with 2 posts.
 
Join Date: Sep 2009
Experience: Intermediate
30-Sep-2009, 12: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!
Closed Thread Bookmark and Share

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.

Smart Search

Find your solution!



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


You Are Using:
Server ID
Advertisements do not imply our endorsement of that product or service.
All times are GMT -5. The time now is 09:29 PM.
Copyright © 1996 - 2009 TechGuy, Inc. All rights reserved.
Powered by vBulletin, Copyright © 2000 - 2009, Jelsoft Enterprises Ltd.
Powered by Cermak Technologies, Inc.