Conditional Formatting and DCount (?)



Should the following statement work in Conditional
Formatting for a field?

DCount("Kept","tblCatch","IvDetId=" & Me![txtIvDetId])>0

I copied the syntax from a form module, so maybe it needs to
be tweaked for use in the Conditional Formatting window?


Yes, but only if txtIvDetId is a number. If text, try changing it to:

DCount("[Kept]","tblCatch","[IvDetId]='" & Me![txtIvDetId] & "'")>0

Bob Larson
Access World Forums Super Moderator
Utter Access VIP
Tutorials at
If my post was helpful to you, please rate the post.

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