I added the below code to count records, but when a company has no record I get Error Number 3075.
Below is the error message:
Any suggestions?
Public Function JobApplCount(ByVal strJobsActivityType As Integer) As Integer
End Function
JobApplCount = DCount("[ActivityID]", "Event", _
"[CompanyID] = " & Forms!frmViewJobAppl!txtCompanyID & " And " & _
"[ActivityID] = " & strJobsActivityType)
"[CompanyID] = " & Forms!frmViewJobAppl!txtCompanyID & " And " & _
"[ActivityID] = " & strJobsActivityType)
End Function
Below is the error message:
An error was encountered
Description: Syntax error (missing operator) in query expression
‘[CompanyID] = And [ActivityID] = 33’.
Error Number: 3075
Description: Syntax error (missing operator) in query expression
‘[CompanyID] = And [ActivityID] = 33’.
Error Number: 3075
Any suggestions?