Unexpected query results (1 Viewer)

mafhobb

Registered User.
Local time
Yesterday, 23:26
Joined
Feb 28, 2006
Messages
1,245
Hi. I am getting odd query results and I don't know why.

I have a table (tblMaterials) that is a simple list of materials with a cost. Then I have another table (tblMaterialsUse) that is linked to properties so I can keep track of what materials are used for each property. At a table level this seems to work fine with the materials used for each property being picked from a combobox that lists all materials.
However, when I try to create a query that will give me a list of the properties with the materials used, I get unexpected results with the data all garbled up and even a property missing. You can see the two tables and the query result below
Query Results.png

...and here you can see the query design
Query Results (2).png

What am I doing wrong?
mafhobb
 

theDBguy

I’m here to help
Staff member
Local time
Yesterday, 21:26
Joined
Oct 29, 2018
Messages
21,455
What do you mean by "garbled up?" What's wrong with the query result?
 

arnelgp

..forever waiting... waiting for jellybean!
Local time
Today, 12:26
Joined
May 7, 2009
Messages
19,229
on tblMateriaslUsed, your "Item" field is String, you need to make it as Long Integer.
this field should be linked to ID of tblMaterials?
 

mafhobb

Registered User.
Local time
Yesterday, 23:26
Joined
Feb 28, 2006
Messages
1,245
What do you mean by "garbled up?" What's wrong with the query result?
If you look at the first query result, for example, you can see : "Can Muntaner, 2-Feb-21, 1, 25Kg Salt, 14.29, 14.29" but it should be "Can Muntaner, 2-Feb-21, 9V Battery, 5.90, 5.90"
mafhobb
 

Pat Hartman

Super Moderator
Staff member
Local time
Today, 00:26
Joined
Feb 19, 2002
Messages
43,233
Compact and repair the database. Perhaps the index has been corrupted. If that doesn't fix it, please post the DB.

You've also only shown us 2 of the 3 tables and you've not posted the SQL.
 

Users who are viewing this thread

Top Bottom