Capture counts in a column MS Access

I had a scenario of capturing counts in several columns and display it in a message box while running a VBA form. So I developed a VBA code using inbuilt function DCount.
Private Sub Check_Counts()

Set db = CurrentDb()
m = DCount("Address", "Table1")
MsgBox "Counts in Address Column is " & m & vbCrLf + "Completed"

End Sub

No comments:

Post a Comment