Multiple Criteria DMax?

Crash1hd

Registered CyberGeek
Local time
Today, 06:45
Joined
Jan 11, 2004
Messages
143
Is it possible to have more then one criteria in Dmax for example

DMax("expr", "Table", "Criteria = 1" & "CriteriaA = 2")

Mind you the & doesnt work so its definatly not the right Choice? :confused:
 
Try

DMax("expr", "Table", "Criteria = " & 1 & " AND " & "CriteriaA =" & 2)

for numeric criteria.

Note string criteria and/or date criteria have yet different context.
 
Ok So what does the string criteria look like?


Also is there a way to get something like

Me.Txt = Text Where Dmax("number", "Table", "Criteria = 1")
so that I get the text field in the table where the numeric field matchs
 
Last edited:
For string criteria:

DMax("expr", "Table", "Criteria = '" & me.criteria & "' AND " & "CriteriaA ='" & me.criteriaA & "'")

And:

Me.Txt = Text Where Dmax("number", "Table", "Criteria = 1")

should be

Me.Txt = Dmax("number", "Table", "Criteria =" & 1)
 

Users who are viewing this thread

Back
Top Bottom