Re: DCount
- From: "kingston via AccessMonster.com" <u27511@uwe>
- Date: Tue, 07 Nov 2006 17:30:09 GMT
Try this:
intSameDay = DCount("[ID]", "PM Date Errors Asc", "[Days to Complete] =" &
int1 & " And [ESDStaffName] = '" & strStaffName & "'")
Make sure int1 is a number or use CLng(int1) instead.
Lamar wrote:
I want use the DCount function but I am having problems with criteria
expression. When I run the code, it keeps telling me there is "data mismatch
in the criteria expression". [Days to Complete] is a field where the data
type is Number. int1 is an integer but I have also made it string.
[ESDStaffName] is a field where the data type is Text. strStaffName is
string. Do I have to change the field [Days to Complete] to a different
data type? Any help is appreciated. Thank you.
intSameDay = DCount("[ID]", "PM Date Errors Asc", "[Days to Complete] ='" &
int1 & "' And [ESDStaffName] = " & "'" & strStaffName & "'")
--
Message posted via http://www.accessmonster.com
.
- Prev by Date: Re: calculation in a access 2000 form, i need help.
- Next by Date: Re: Adding "ALL" into Combo Box
- Previous by thread: Looking for Mere Clever Way to Write Query
- Next by thread: Re: Scrolling a TextBox in code
- Index(es):
Relevant Pages
|