[mso] Re: Access Query

  • From: Cathy.Evans@xxxxxxxxx
  • To: mso@xxxxxxxxxxxxx
  • Date: Mon, 10 Jan 2005 10:30:17 -0500

Ok, that is unfortunate.  Try using LAST on the Subj field, with MAX on the
SubjID.  It worked in my test, but I only used your 2 data rows as sample.
My question overall regarding an access data table is, if MAX ID is
selected, will the LAST Subj automatically be associated with that ID?  If
so, this may be a solution.


                                                                                
                                     
                      "Glenda Wells"                                            
                                     
                      <gwells@xxxxxxxxxxx      To: <mso@xxxxxxxxxxxxx>          
                                     
                      >                                                         
                                     
                      Sent by:                 cc:                              
                                     
                      mso-bounce@freelist                                       
                                     
                      s.org                    Subject:  [mso] Re: Access Query 
                                     
                      01/10/2005 10:15 AM                                       
                                     
                      Please respond to                                         
                               ..... 
                      mso                                                       
                                     
                                                                                
                                     
                                                                                
                                     




unfortunately I'm stuck with just the one query. I can add an additional
table such as the same query but I can't create another query outside of
this one.  in SQL, I could do it with a sub query kind of thing but
don't know how within this &*%# structure.  I only want the value
related to the max SubjID. /g

-----Original Message-----
From: Cathy.Evans@xxxxxxxxx [mailto:Cathy.Evans@xxxxxxxxx]
Sent: Monday, January 10, 2005 09:34 AM
To: mso@xxxxxxxxxxxxx
Subject: [mso] Re: Access Query


If I'm understanding your sample data, it will return both values cause
it is returning a max for each Subj since they are different.  Is all
your data residing in one table?  If so, you will have to do a separate
summary query of only the Subj and SubjID, and in your MAX query, add
the summary Subj query, relate them on the ID, and return the value from
the Subj summary query instead of your main table.  This should return
the desired result.

The Subj field is the reason you're still getting 2 results, cause since
it is different, it is creating a row value that is unique, and since
you need for it to show in the results, you need to be only pulling the
Subj that is equal to the MAX SubjID.

Hope this helps, Cathy








Hi All.
I would like to create an Access query where I get the Maximum value of
something that could have more than one value.

example table:
Name            UID             Subj            SubjID
John Smith      abc123          US history      01
John Smith      abc123          Roman history   02

My desired result is:
John Smith      abc123          Roman history   02

The problem is when I put MAX on the SubjID field my query still
displays both values instead of just the one.








-----------------------------------------------------------------------------------------------------
The information transmitted is intended only for the person
or entity to which it is addressed and may contain proprietary,  
business-confidential and/or privileged material.
If you are not the intended recipient of this message you 
are hereby notified that any use, review, retransmission, 
dissemination, distribution, reproduction or any action taken
in reliance upon this message is prohibited. If you received
this in error, please contact the sender and delete the 
material from any computer.  Any views expressed in this message
are those of the individual sender and may not necessarily reflect 
the views of the company.
-------------------------------------------------------------------------------------------------------

*************************************************************
You are receiving this mail because you subscribed to mso@xxxxxxxxxxxxx or 
MicrosoftOffice@xxxxxxxxxxxxxxxx

To send mail to the group, simply address it to mso@xxxxxxxxxxxxx

To Unsubscribe from this group, send an email to 
mso-request@xxxxxxxxxxxxx with the word "unsubscribe" (without the quotes) in 
the subject line.

Or, visit the group's homepage and use the dropdown menu.  This will also allow 
you to change your email settings to digest or vacation (no mail).
//www.freelists.org/webpage/mso

To be able to use the files section for sharing files with the group, send a 
request to mso-moderators@xxxxxxxxxxxxx and you will be sent an invitation with 
instructions.  Once you are a member of the files group, you can go here to 
upload/download files:
http://www.smartgroups.com/vault/msofiles
*************************************************************

Other related posts: