I am trying to get the DCount function to work!!
I have a form that has a textbox named Personnel. This displays employee numbers(Unique) driven by a query. On the click of a button the employee number gets sent to the Results Table.
I want to be albe to know how many occurance of that unique employee number are in the results table for each emp number. I have tried the following code in a Text box on my form and the result is that it's counting the total number of employee numbers in the table. It does not seem to be picking up the unique employee number form the text box.
You're passing the literal string "[Personnel]" which is being translated into the personnel field in the query. Basically you've said "Return everything where 1=1". Break the string after the = and reference your control instead.