dcount error

As Gemma has said, try this

MsgBox DCount("[Name]", "absent", "[Name] = " & Chr(34) & combo136.value & Chr(34))
 
Last edited:
cheers for all your help and this really annoying me now as im trying everything you say and more.

this is the line at the moment:

MsgBox DCount("[Name]", "absent", "[Name]" = '" & combo136.value & "'")

but it errors at the first single quote, it wont let me finish the line.
Too many quotes see the one here:

"[Name]" = '" &

Should be

"[Name] = '" &
 
excellent, first part working

now to add this code:

And [absentcode] = countme

to the end - is this possible?

countme is just text. it doesn't come from anywhere on the form.
 
MsgBox DCount("[Name]", "absent", "[Name] = " & Chr(34) & combo136.value & Chr(34) & " And [absentcode]='countme'")
 

Users who are viewing this thread

Back
Top Bottom