?
Solved

distinct records query

Posted on 2003-02-28
2
Medium Priority
?
262 Views
Last Modified: 2010-05-01
i have an app that filters what records a shown depending on what button is clicked.

the problem i have is that one of the filters requires me to join the customers table to another table on the ID field and select distinct records so i only end up viewing each customer once.

the problem is that the distinct query says it cannot select distinct on memo fields.  i need to show this memo field.  is there any way around it

0
Comment
Question by:Marcusw
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 32

Accepted Solution

by:
Brendt Hess earned 200 total points
ID: 8041850
Depends.  Which table is the memo in?  If it is in the Customers table, you can use this technique:

(1)  Create a Distinct query with all of the information needed *except* the memo field.  Be sure to include the Customer ID field (the unique identifier for a customer record).  Save this as a query (for our example, call it Test1, but you would name it something sensible).

(2)  SELECT against both the Customer table and the Test1 query, JOINing on the Customer ID field, e.g.:

SELECT Test1.*, Customer.Memo
FROM Test1
INNER JOIN Customer on Test1.ID = Customer.ID
0
 

Author Comment

by:Marcusw
ID: 8041974
thanks for the suggestions since i have posted the questions i have tried to run the query from another computer and it works perfectly

do you know why this might be

i thought it was impossible but i have checked all the results it brings up and they are perfect
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

When trying to find the cause of a problem in VBA or VB6 it's often valuable to know what procedures were executed prior to the error. You can use the Call Stack for that but it is often inadequate because it may show procedures you aren't intereste…
Background What I'm presenting in this article is the result of 2 conditions in my work area: We have a SQL Server production environment but no development or test environment; andWe have an MS Access front end using tables in SQL Server but we a…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
Suggested Courses
Course of the Month8 days, 8 hours left to enroll

764 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question