Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Rhinorhino on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Error 3075

Status
Not open for further replies.

lmcc007

Technical User
Joined
May 7, 2009
Messages
164
Location
US
When the below code runs and there is no data, I get Error #3075 -- Syntax error (missing operator) in query expression '[CompanyID] = And [ActivityID] = 1'.

Public Function JobTotal(ByVal strActivity As Integer) As Integer

JobTotal = DCount("[ActivityID]", "Event", "[CompanyID]= " & Forms!frmViewJobList!txtCompanyID & " And " & _
"[ActivityID]= " & CStr(strActivity))

End Function

How can I resolve this when there are no record (no activity yet for this record) to total?
 
Whew! Nice work!

Ni neart go cur le cheile.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top