Hi,
i want to auto count the contact in two field combination repeated,
i tried the VBA afterupdate but not matching exactly.
I used this code, but not couting exactly
Private Sub surname_afterUpdate()
[contact] = 1
contact = (DCount("[FirstName]", _
"Employee", "[FirstName] ='" _
& Me!Firstname & "'")) And (DCount("[Surname]", _
"Employee", "[Surname] ='" _
& Me!Surname & "'"))
End Sub
I want the contact count exactly as
Firstname Surname contact
ramesh gr 1
mouli gr 1
ramesh gr 2
harini ab 1
ramesh gr 3
abcde ab 1
ramesh ab 1
mouli gr 2
harini ab 2
Please help any one to make correct code or other method of counting.
Thanks in advance
i want to auto count the contact in two field combination repeated,
i tried the VBA afterupdate but not matching exactly.
I used this code, but not couting exactly
Private Sub surname_afterUpdate()
[contact] = 1
contact = (DCount("[FirstName]", _
"Employee", "[FirstName] ='" _
& Me!Firstname & "'")) And (DCount("[Surname]", _
"Employee", "[Surname] ='" _
& Me!Surname & "'"))
End Sub
I want the contact count exactly as
Firstname Surname contact
ramesh gr 1
mouli gr 1
ramesh gr 2
harini ab 1
ramesh gr 3
abcde ab 1
ramesh ab 1
mouli gr 2
harini ab 2
Please help any one to make correct code or other method of counting.
Thanks in advance
Last edited: