C Crash1hd Registered CyberGeek Local time Today, 13:46 Joined Jan 11, 2004 Messages 143 Jun 5, 2004 #1 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?
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?
L llkhoutx Registered User. Local time Today, 14:46 Joined Feb 26, 2001 Messages 4,013 Jun 5, 2004 #2 Try DMax("expr", "Table", "Criteria = " & 1 & " AND " & "CriteriaA =" & 2) for numeric criteria. Note string criteria and/or date criteria have yet different context.
Try DMax("expr", "Table", "Criteria = " & 1 & " AND " & "CriteriaA =" & 2) for numeric criteria. Note string criteria and/or date criteria have yet different context.
C Crash1hd Registered CyberGeek Local time Today, 13:46 Joined Jan 11, 2004 Messages 143 Jun 5, 2004 #3 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: Jun 5, 2004
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
L llkhoutx Registered User. Local time Today, 14:46 Joined Feb 26, 2001 Messages 4,013 Jun 6, 2004 #4 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)
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)
C Crash1hd Registered CyberGeek Local time Today, 13:46 Joined Jan 11, 2004 Messages 143 Jun 8, 2004 #5 Excelent works great!