Using [] is necessary where field names have spaces or special characters or where you've used a reserved word. Otherwise its up to you.
Using DCount("*", TableName, filter criteria) and DCount("Received",....) should normally give EXACTLY the same result though that may not always be true
Using "*" allows Access to just count the records whereas using the field name requires it to count records in that field.
If the field is indexed, I expect the time difference will be negligible
If not indexed, I believe it will take a bit longer (not checked).
However even if I'm right, unless you have a lot of records, you may not notice the difference. By all means use the field name if you prefer.
However as both are giving zero, I expect the Received field is boolean (yes/no). If I'm correct, change it to False (without quotes)
Works for me
Not received = 15 ; Received = 0
See attached
In future, it would be appreciated if uploaded files had all irrelevant items removed (we only needed the table & form)
Also, all security features removed (as I have done in my updated version)
Hoping this thread is still valid as It seems my issue is comparable...
I get a type mismatch on the following. Truth is I never came to understand all the double quotes and quotes. I am working from similar statements but apparently not similar enough...
Salesperson: shorttext 5 char
SKU: Shortext
Company Name: Shortext
The function is looking up the salesperson code from table customer pricing where the SKU code is the same as the SKU code entered into the field and the company name matches the control on the parent form.
Its a one shot, one kill. Thanks Man. I did try removing one set of " before Company name but was getting syntax error, coouldnt figure out which other " needed to be removed. Thanks so much!