DCount alwaysreturning 1

Joined
Jul 4, 2012
Messages
1
Reaction score
0
I want to use a DCount function in a beforeupdate to check on the number of entries in my table (and display a warning when a maximum is reached on entries with a specific ID).

Using DCount in the beforeupdate without criteria returns the correct total number of records in my table as follows:
DCount("[Id]", "Roster").

When I add the criteria to this which is a value from a field on the form it looks like this:
DCount("[Id]", "Roster", "[Id] = Form![Workshop]")

When I display the value of Form![Workshop] it shows the correct numeric value that I want to select on. But for some reason this DCount always returns 1?

What am I doing wrong?
 

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