Public Function Get_Employee_Info_RecordCount() Get_Employee_Info_RecordCount = DCount("EmployeID", "Employee Info") End Function
Dim Number_Of_Employees Number_Of_Employees = Get_Employee_Info_RecordCount
(in a form):
Code:
' Text_EmployeeCount is a textbox in the form.Me.Text_EmployeeCount.Value = Get_Employee_Info_RecordCount
This new module was created and did work from a query, however there have been records deleted from this table and the query breaks when the primary key EmployeID (Autonumber) is no longer consecutive. Is there a way I can count rows or another method to get total records from a table?