MAX/DMAX Frustration 
Author Message
 MAX/DMAX Frustration

Here's the scenario:  I have a table, very similar to an orders table in all
the access examples, which has a client account # field, date ordered field,
first and last names of subject and a request number for the subject.  In
producing a query, with the just the date and client account # fields, I get
the successful results with the "max" of the order date by account#. The
totals field for the account# is "group by" and the ordered date is "max".
In this state, the query doesn't show all the data I need to see.  As I add
fields, they're also "group by" in the totals field and the max no longer
produces the desired result.  I ultimately need to sort by acct# and choose
the most recently ordered request.  This may throw a wrench into the
equation...by producing the "max" of the ordered date, potentially multiple
records could be chosen for the account.  As always, Access Guru's , thank
you!


Thu, 21 Mar 2002 03:00:00 GMT  
 MAX/DMAX Frustration
Divide this into more than one query. Build a saved query where you put what
you first described, before you run into problems. In a 2nd query, for
example:
1) You include the first query.
2) The table you want additional data from.
3) Join between order date in the first query and the table.
4) Throw in additional fields.

Mattias J?nsson



Quote:
> Here's the scenario:  I have a table, very similar to an orders table in
all
> the access examples, which has a client account # field, date ordered
field,
> first and last names of subject and a request number for the subject.  In
> producing a query, with the just the date and client account # fields, I
get
> the successful results with the "max" of the order date by account#. The
> totals field for the account# is "group by" and the ordered date is "max".
> In this state, the query doesn't show all the data I need to see.  As I
add
> fields, they're also "group by" in the totals field and the max no longer
> produces the desired result.  I ultimately need to sort by acct# and
choose
> the most recently ordered request.  This may throw a wrench into the
> equation...by producing the "max" of the ordered date, potentially
multiple
> records could be chosen for the account.  As always, Access Guru's , thank
> you!



Fri, 22 Mar 2002 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. VB 3 - SQL-DMAX AND MAX METHODS

2. How to use DMax from VB to get max value from Access table

3. DMax and DMin functions

4. Where to input DMin and DMax?

5. DMax syntax can't compile

6. DMax with "And" Criteria

7. I'm trying to use 2 conditions with variables in a DMax function

8. dmax function

9. DMin and DMax problems

10. DMax vs. SQL : Performance

11. Passing parameters to a DMax function

12. Using DMAX function in Visual Basic

 

 
Powered by phpBB® Forum Software