Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Query distorting numbers 1

Status
Not open for further replies.

Allilue

Technical User
Sep 14, 2000
189
GB
Hello,

I have a table with numbers in one field and a name in the other. When I put it in a query, i want to group the names, and have a sum of the numbers. I set this up, but when the results show, all of the numbers seem to be multipled by 10. Do you know why this is happening?

THankyou..
 
A bit bizarre...
I'll assume you're using a select query, with the "totals" (sigma symbol) depressed.
In your query, your names "Total" should say "group by" and Your numbers column "Total" row should say "Sum". Double-click anywhere on the query screen its self to pop the queries properties. Set the "Unique Values" property to "Yes". Give it a try! Gord
ghubbell@total.net
 
How did you set up the query? Or in other words, what does the design look like, or what is the sql code?

Ken
 
Ken,
Lets make a new query using the query wizard. Go to the database window-Queries-New, select "Simple query wizard". Follow the steps and at the last option open it to modify the queries design. From there follow the previous steps. SQL or Structured Query Language is the real language that is going on behind the scenes of the query. You may look at it at any time as it is a choice once you're in query design mode. I wouldn't play with it on its own quite yet. Give this a shot! Gord
ghubbell@total.net
 
The weirdest thing is happening...
When I set the query properties to Unique Values Yes, the problem was solved for some of the records, but not all. It seems that it is random. The field that is a sum, seems to be working for some records, and is having a zero added to the end on a few.
HELP!
 
Allilue,

Please or e-mail me the table and query in an MDB format. I will take a look.


MichaelRed
redmsp@erols.com

There is never time to do it right but there is always time to do it over
 
I did some more digging, and the sums are not being multiplied by 10, but 9. Records are duplicated with the same data, but the SUM fields are multiplied by 9!?!?!

I'm not sure what to make of this...
 
Hello Allilue!
Could you please check the Data type in the table where your numbers reside? This should be set to Number and as a safety lets set the Field Size to Double to allow for fractions. We'll be watching! Gord
ghubbell@total.net
 
The datatypes are set as numbers. I re-did the query in a more simplified setup, and the same thing happened. I also deleted the relationships, thinking this may have caused the problem. Same thing. I'll keep trying, but if you have any suggestions, please let me know...

THanks.
 
As Michael suggested if you'd like to email over a copy I'll be glad to look in to it for you. My treat! Gord
ghubbell@total.net
 
Hey,

I was trying to set up my database to send to you, then decided to give it one last try. I ended up re-doing (copying)the entire database, and then realized that it was part of the relationships. But now it works!

Thank-you!

Allison
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top