Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 5975509
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T21:05:42+00:00 2026-05-22T21:05:42+00:00

I have two tables in an Access database, tblProducts and tblProductGroups. I am trying

  • 0

I have two tables in an Access database, tblProducts and tblProductGroups.

I am trying to run a query that joins both of these tables, and brings back a single record for each product. The problem is that the current design allows for a product to be listed in the tblProductGroups table more than 1 – i.e. a product can be a member of more than one group (i didnt design this!)

The query is this:

select tblProducts.intID, tblProducts.strTitle, tblProductGroups.intGroup 
from tblProducts 
inner join tblProductGroups on tblProducts.intID = tblProductGroups.intProduct 
where tblProductGroups.intGroup = 56 
and tblProducts.blnActive 
order by tblProducts.intSort asc, tblProducts.curPrice asc

At the moment this returns results such as:

intID | strTitle | intGroup
1     | Product 1 | 1
1     | Product 1 | 2
2     | Product 2 | 1
2     | Product 2 | 2

Whereas I only want the join to be based on the first matching record, so that would return:

intID | strTitle | intGroup
1     | Product 1 | 1
2     | Product 2 | 1

Is this possible in Access?

Thanks in advance
Al

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-22T21:05:43+00:00Added an answer on May 22, 2026 at 9:05 pm

    This option runs a subquery to find the minimum intGoup for each tblProducts.intID.

    SELECT tblProducts.intID
    , tblProducts.strTitle
    , (SELECT TOP 1 intGroup 
       FROM tblProductGroups 
       WHERE intProduct=tblProducts.intID 
       ORDER BY intGroup ASC) AS intGroup
    FROM tblProducts 
    WHERE tblProducts.blnActive 
    ORDER BY tblProducts.intSort ASC, tblProducts.curPrice ASC
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have an Access database that has two tables that are related by PK/FK.
I have two tables in my access database that I want to be able
I have a Microsoft Access database and I have two tables. Table1 has a
I have an Access 2007 database where I have two tables, exp_cash and exp_cheque.
Let's say that I have two tables in my database : Rabbits and Carrots.
I have two tables in a 2010 Access Database. One for Customers and One
I'm currently facing a database query issue. I have two tables, items and details
I have two tables and a form in a Microsoft Access Database. Lets the
I have two tables in an MS Access 2010 database: TBLIndividuals and TblIndividualsUpdates. They
I have Access database and I'm using VB.NET. DB has two tables Technicians Faults

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.