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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Only selecting one record from multiple records

Status
Not open for further replies.

wally2321

Technical User
May 30, 2001
64
US
I am creating a Make Query using the Design feature of Microsoft Access. I have a simple question that I can not seem to figure out. I am a novice at this, and I am probably asking a simple question.

What I want to do is only select a record once. i.e.

First column is field names

MATERIAL Price Quantity
AA 1.00 2
AA 2.00 4
AC 1.00 9
AA 9.00 1

What I want to do is pick only one of the material records, and the related data with that record. How can I do that in a make query. Can someone please give me some guidance?

 
I should add that I want to eliminate duplicates, and ensure that at least one of the records is there.
 
Are you saying you want to create a "make table" query? You put make query and I am confused. Also, with your example above, would you want those 4 records to be only 1 record in your new table? How are you determining what 1 record you want to use? Dawn
 
Sorry for the confusion...

I am using a Make query in the design mode. The table I am creating needs to be limited by the criteria that I am trying to create.

In the example:

MATERIAL Price Quantity
AA 1.00 2
AA 2.00 4
AC 1.00 9
AA 9.00 1


I would like to return AA only once with the other attributes (Price, quantity, etc.) as well as AC.

So for our example the key field is [MATERIAL]. In this field, I only want to return one value once. How is this possible?
 
what are you doing with the other price and quantity values? If you want just one occurance of each material, use the group feature. Click on the "totals" button on the tool bar (the qreek symbol) and that adds another row to your design grid. In the Material column choose "group by" and in the other fields choose "first". This should give you the records you are asking for and then you can do your make table. (you can click on the "view" button to view your results before running the make table query) Does this help? Dawn
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top