
Originally Posted by
Patience
Hi guys,
I have a DCount function which counts the number of identical records and shows the result in a form. The code is this:
=DCount("Version";("Tabel - Textile data and test results");("[Code] = Formularer![Textile overview]![Code]"))
However, I need this calculation to be performed when the fields for a new record is being filled. That is before the record is saved.
So when the user enters a number in field A and exits the field, then the DCount calculates and instantly shows the result.
I have tried entering the DCount function in AfterUpdate, Beforeupdate and all the others, but I can not get it to work. It only works when existing records are shown in the form.
How can I get around this?
Thanks a lot!
BR