DMAx help

humph

Registered User.
Local time
Today, 10:16
Joined
Sep 7, 2006
Messages
69
Thanks for all the help to date.

Problem trying to get a dmax field for an invoice no in a query - am doing something wrong current attempt below won't work

Expr1 :dmax([Invoice no],[Table name]![Invoice no])

what am I missing - do I need something on the end when I get this to work I will use it to add 1 for the final query prior to print
 
Try

Expr1 :dmax("[Invoice no]","[Table name]")

This assumes that the field name is actually 'Invoice no' and that you're going to replace the words 'Table Name' with the actual name of the table.

If you wanted to search for the highest given some condition or other, you could alter it to something like

Expr1 :dmax("[Invoice no]","[Table name]","[Last Name] = 'Jones'")
 
I maybe silly but still not getting it.

I want to find the highest invoice no from a table called customer statements.
I have a query only looking at the table customer statements and have set up the expression but it will not work. I am not sure why/ how to set up the criteria I thought it was optional.


Expr1: DMax([Invoice number],[client Statements]) does not work and asks for an expression

Expr1: DMax([Invoice number],[client Statements],[Client Master no]=5) does not work.

It keeps asking for paramater value for client statements which is the table name>
 
You have to use the "" symbol. Try

Expr1: DMax("[Invoice number]","[client Statements]")

or, if that doesn't work

Expr1: DMax("Invoice number","client Statements")

(I can never remember whether the [] are needed within the quotes or not).
 
You're a star!!!!!

The quote marks and the [] get me the required answer

Yet again many thanks.
 

Users who are viewing this thread

Back
Top Bottom