Dcount error

S

snowiii

I am tryying to count the number of occurances in a field "ineligiblestatus"
when it's value is true and the date on the form I am in is equal to the date
associated with the ineligible status. I should say the that the ineleigible
status and the compare to date are in a table taht is linke to my form and
the date from the form is chosen from the table, in the form via a combo box.

I am sure it is my syntax but I am a rookie at this programming so I would
appreciate any help someone can give me to correct it. Right now the erro I
receive is "The expression you entered has an invalid date value"...Here is
my code:

= DCount ( [IneligibleStatus] , "Maintbl", # '“&[Import date]= ‘â€
&’â€Me![ImportDate])"& “#'†And [Ineligible Status] = True")

Thanks!
 
G

George Nicholson

= DCount ( "[IneligibleStatus]" , "Maintbl", "[Import date]= #" &
Me![ImportDate]) & "# And [Ineligible Status] = True")
 
S

snowiii

Thanks George...This worked! :-}

George Nicholson said:
= DCount ( "[IneligibleStatus]" , "Maintbl", "[Import date]= #" &
Me![ImportDate]) & "# And [Ineligible Status] = True")

--
HTH,
George


snowiii said:
I am tryying to count the number of occurances in a field
"ineligiblestatus"
when it's value is true and the date on the form I am in is equal to the
date
associated with the ineligible status. I should say the that the
ineleigible
status and the compare to date are in a table taht is linke to my form and
the date from the form is chosen from the table, in the form via a combo
box.

I am sure it is my syntax but I am a rookie at this programming so I would
appreciate any help someone can give me to correct it. Right now the erro
I
receive is "The expression you entered has an invalid date value"...Here
is
my code:

= DCount ( [IneligibleStatus] , "Maintbl", # '"&[Import date]= '"
&'"Me![ImportDate])"& "#'" And [Ineligible Status] = True")

Thanks!
 

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

Top