Unmatched Qry (1 Viewer)

Gismo

Registered User.
Local time
Today, 18:17
Joined
Jun 12, 2017
Messages
1,298
Hi,

I have a table with standard issue items
when I run a unmatched qry i want to see all my items from this table and only items that has these items ordered show as quantity ordered with the registration number from the other table

if the item has not been ordered by registration number, the qty field should be blank

Joined property options does not seem to give me all the items from Table 1

1601292380718.png




1601292492220.png
 

Attachments

  • 1601292335740.png
    1601292335740.png
    6.5 KB · Views: 209

theDBguy

I’m here to help
Staff member
Local time
Today, 08:17
Joined
Oct 29, 2018
Messages
21,449
Hi. That doesn't look like a normal unmatched query. Have you tried using the Wizard?
 

Gismo

Registered User.
Local time
Today, 18:17
Joined
Jun 12, 2017
Messages
1,298
i tried the wizard as well, still the same result
i need to see all the records from the first table. and the qty of the second tble if ordered
it does not give me the blanks on the 2nd table
i don't have any criteria except for the type of data i need in the first table and the registration i am comparing too in the second tbl

1601295069255.png
 

theDBguy

I’m here to help
Staff member
Local time
Today, 08:17
Joined
Oct 29, 2018
Messages
21,449
Hi. Since you're filtering the left table, that means the query won't return all the records from that table.
 

Gismo

Registered User.
Local time
Today, 18:17
Joined
Jun 12, 2017
Messages
1,298
Hi. Since you're filtering the left table, that means the query won't return all the records from that table.
by filtering the left table with "new aircraft assembly", i must have 6 records in the left table
 

theDBguy

I’m here to help
Staff member
Local time
Today, 08:17
Joined
Oct 29, 2018
Messages
21,449
by filtering the left table with "new aircraft assembly", i must have 6 records in the left table
To verify that, try removing the right table from your query.
 

Gismo

Registered User.
Local time
Today, 18:17
Joined
Jun 12, 2017
Messages
1,298
Just as an experiment, try saving that as a new query and then create an unmatched query from that query by joining the new query to the other table.
Tried that as well

1601297704228.png





1601297728987.png
 

theDBguy

I’m here to help
Staff member
Local time
Today, 08:17
Joined
Oct 29, 2018
Messages
21,449
Next step then is for you to share your data, so we can help you troubleshoot it further. Can you do that?
Wait a minute... I just noticed in your last post, you seem to be filtering the Right table, instead of the Left.
 

Gismo

Registered User.
Local time
Today, 18:17
Joined
Jun 12, 2017
Messages
1,298
Wait a minute... I just noticed in your last post, you seem to be filtering the Right table, instead of the Left.
on the left, i am filtering to only show items that is standard issue to new aircraft assembly
on the right, i am filtering the aircraft registration as i only need to see for the specific registration
 

arnelgp

..forever waiting... waiting for jellybean!
Local time
Today, 23:17
Joined
May 7, 2009
Messages
19,231
abandon the Join query and instead use Dcount() to Count the items in another table:

select MaterialNo, DCount("1", "[SQ01 Tbl]", "MaterialNo = '" & [MaterialNo] & "'") As OrderedQty From MaterialNo;
 

Gismo

Registered User.
Local time
Today, 18:17
Joined
Jun 12, 2017
Messages
1,298
abandon the Join query and instead use Dcount() to Count the items in another table:

select MaterialNo, DCount("1", "[SQ01 Tbl]", "MaterialNo = '" & [MaterialNo] & "'") As OrderedQty From MaterialNo;
not sure this will work

i need to see all the items in the left table and the qty ordered in the right or blank if not ordered, all this on the right filtered by the registration number

1601299352298.png
 

theDBguy

I’m here to help
Staff member
Local time
Today, 08:17
Joined
Oct 29, 2018
Messages
21,449
on the left, i am filtering to only show items that is standard issue to new aircraft assembly
on the right, i am filtering the aircraft registration as i only need to see for the specific registration
So, filtering the left table, you get back 6 rows. Then, filtering the right table, that 6 rows gets reduced down to 2 rows. That's got to be correct then. Otherwise, you may be joining ir filtering on the wrong fields.
 

arnelgp

..forever waiting... waiting for jellybean!
Local time
Today, 23:17
Joined
May 7, 2009
Messages
19,231
i am sure it will work.
for those without orders, it will come as zero (0).
but you can hide the zero qty by using the Right Format on that Column.
 

Gismo

Registered User.
Local time
Today, 18:17
Joined
Jun 12, 2017
Messages
1,298
So, filtering the left table, you get back 6 rows. Then, filtering the right table, that 6 rows gets reduced down to 2 rows. That's got to be correct then. Otherwise, you may be joining ir filtering on the wrong fields.
the end result is correct, the 2 lines, but i would like to still see the 6 lines, even though the right may not have any orders so the field qty should be blank
 

Gismo

Registered User.
Local time
Today, 18:17
Joined
Jun 12, 2017
Messages
1,298
i am sure it will work.
for those without orders, it will come as zero (0).
but you can hide the zero qty by using the Right Format on that Column.
tnx, let my try again
 

arnelgp

..forever waiting... waiting for jellybean!
Local time
Today, 23:17
Joined
May 7, 2009
Messages
19,231
see Query1 of what i am talking about.
 

Attachments

  • sampleAgain.zip
    21.3 KB · Views: 204

Users who are viewing this thread

Top Bottom