DCount function - runtime error.

  • Thread starter Thread starter Eroc
  • Start date Start date
E

Eroc

When trying to execute the following line
in the immediate window:

DCount("*","tmpTimeLinePayments","[Duration]<='5'")

I get the following error message =
Date type mismatch in Criteria expression.

I really have no idea what I'm doing wrong here.
Any tips/suggestions are most welcome.

TIA.
 
Hi.

You'll receive Error #3464 with a data type mismatch. If the data type in
the "Duration" field in the table is a numerical data type, then remove the
single quotes surrounding the number 5.

HTH.

Gunny

See http://www.QBuilt.com for all your database needs.
See http://www.Access.QBuilt.com for Microsoft Access tips.

(Please remove ZERO_SPAM from my reply E-mail address, so that a message
will be forwarded to me.)
 
If Duration is a Number field (not a Text field), drop the extra quotes:
DCount("*","tmpTimeLinePayments","[Duration]<=5")
 
Is Duration a numeric data type field? If yes, don't delimit the value being
matched with ' characters:

DCount("*","tmpTimeLinePayments","[Duration]<=5")
 
When trying to execute the following line
in the immediate window:

DCount("*","tmpTimeLinePayments","[Duration]<='5'")

I get the following error message =
Date type mismatch in Criteria expression.
Duration is numerical, therefor leave the ['] out, this is only for
strings

If you expect an answer to a personal mail, add the word "manfred" to the first 10 lines in the message
MW
 

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

Similar Threads

Access MS Access DCount function problem 0
DCount and IIf function 10
Dcount operation 2
DCount syntax 11
DCount type mismatch 4
DCount with AND 1
Error 3464 with dCount - some computers only 13
DCount 2

Back
Top