By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
434,641 Members | 2,085 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 434,641 IT Pros & Developers. It's quick & easy.

Refining Results from a Query - Beginner Question

P: 9
Hi, I'm very very new to access but hopefully I'm learning quickly. I need some help on what I think maybe as a result of me having a little tunnel vision on my database & confusing myself.

An example of what I've done...

I have several tables e.g.

Table 1
Product No.------------Stock Holding
A1-------------------------10

Table 2
Product No.-----------Date Despatched----------Qty Despatched
A1------------------------01/01/2010-------------------3
A1------------------------02/01/2010-------------------2

I link the two tables based on the product number & create a query which I want to show the following results...

Query Required:-
Product No.------------Stock Holding--------------Date Despatched----QtyDespatched
A1-------------------------10-------------------------------01/01/2010-------------3
---------------------------------------------------------------02/01/2010------------2

However the query is returning the following....

Query actually being returned:-
Product No.------------Stock Holding--------------Date Despatched----QtyDespatched
A1-------------------------10-------------------------------01/01/2010-------------3
A1-------------------------10-------------------------------02/01/2010-------------2

Hopefully its clear that my problem is the product no. & the stock holding figure are returned twice as a result of there being two despatch dates & qty's - what I actually want is for the fields where there is only one set of data to be blank/null, but where they do have more than one result to return to populate accordingly. Does this make sense & is it possible to somehow achieve this or do I need to re-think entirely how I'm trying to get to me results?

Thanks a lot for your time.
BEP
Jan 12 '10 #1
Share this Question
Share on Google+
2 Replies


TheSmileyCoder
Expert Mod 100+
P: 2,321
That is how the query works. I think in your case what you need to do, is create a report based on your query, and then add "Grouping" on the product ID.

I can't really outline the whole procedure here, but try to play around with it, and then return here if you have any specific questions.
Jan 12 '10 #2

nico5038
Expert 2.5K+
P: 3,072
In a report there's a field property to "suppress duplicate values" when set to "Yes" the result will be as you want.

Nic;o)
Jan 12 '10 #3

Post your reply

Sign in to post your reply or Sign up for a free account.