If DLookup("[ProjectStatus]", "tbl_Empl_Master", "[ProjectStatus] = " & "On-Board") > 0 Then
If DLookup("[ProjectStatus]", "tbl_Empl_Master", "[ProjectStatus] = " & “’"&”On-Board"&”’”) > 0 Then
If DLookup("ProjectStatus", "tbl_Empl_Master", "ProjectStatus = "On-Board") > 0 Then
These are the diferent ways i set up my dlookups but I think you want to be useing a dcount as follows
If Dcount("ProjectStatus", "tbl_Empl_Master", "ProjectStatus = "&"On-Board") > 0 Then
And here are the notes and examples i keep in my treepad
' The DLookup function returns the field from the first matching record
' It is very touchy and criteria is optional
' DLookup("[FIELD]","TABLE/QUERY","CRITERIA")
DLookup("[FIELD]","TABLE","Year = " & TheYear)
[RegionCode] = DLookup("[Region Code]", "Region", "[Forms]![Market]![Region ID] = [ID]")
[Cust_ID] = DLookup("[Company]", "Users", "[Login] = " & "[Forms]![Login]![AskLogin]")
Location = DLookup("City", "Market", "[Market Name]='" & Me.Market_Name & "'")
FPQ_ID = DLookup("[ID]", "FPQ", "[FPQ Number] = " & "[FPQ_Number]")
' Here is the one to watch out for
ThePOID = DLookup("[ID]", "PurchaseOrders", "[PO Number] = " & "'" & [ThePO] & "'")
Me.CompanyID = DLookup("[companyID]", "Company", "[company]=" & [Forms]![Login]![Company])