Dmax in a Domin

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi all,
My table contains : Field1 Field2
11 b
13 bb
20 cc
26 c
How can I get maximum number in field1 in range 10 - 20 via code(Dmax)?
any help would be appreciate
 
=DMax("[Field1]", "[MyTable]", "[Field1] BETWEEN 10 AND 20")
 
Hi Douglas,
Thank you for comment but, I receive an Error :
"Data type mismatch in criteria expression. (Error 3464)"
Bijan

Douglas J. Steele said:
=DMax("[Field1]", "[MyTable]", "[Field1] BETWEEN 10 AND 20")

--
Doug Steele, Microsoft Access MVP

(no private e-mails, please)


bijan said:
Hi all,
My table contains : Field1 Field2
11 b
13 bb
20 cc
26 c
How can I get maximum number in field1 in range 10 - 20 via code(Dmax)?
any help would be appreciate
 
What data type is Field1? Is it text?

Hi Douglas,
Thank you for comment but, I receive an Error :
"Data type mismatch in criteria expression. (Error 3464)"
Bijan

Douglas J. Steele said:
=DMax("[Field1]", "[MyTable]", "[Field1] BETWEEN 10 AND 20")
 
As Jason asks, is Field1 a text field? If so, then you need:

=DMax("[Field1]", "[MyTable]", "[Field1] BETWEEN '10' AND '20'")

Of course, you may run into problems with that: using text, 19999999 is
between 10 and 20.

--
Doug Steele, Microsoft Access MVP

(no private e-mails, please)


bijan said:
Hi Douglas,
Thank you for comment but, I receive an Error :
"Data type mismatch in criteria expression. (Error 3464)"
Bijan

Douglas J. Steele said:
=DMax("[Field1]", "[MyTable]", "[Field1] BETWEEN 10 AND 20")

--
Doug Steele, Microsoft Access MVP

(no private e-mails, please)


bijan said:
Hi all,
My table contains : Field1 Field2
11 b
13 bb
20 cc
26 c
How can I get maximum number in field1 in range 10 - 20 via
code(Dmax)?
any help would be appreciate
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top