OK Update.
While I prematurely solved the thread... this is not solved.
Apparently it is impossible to use Dlookup or Dcount with an input variable as criteria from a recordset.
The following returns no syntax error, but returns 0 matches (there is a match - trust me)
Code:
Dim cName As Variant, matchCnt As Integer
cName = rs.Fields("computer name").Value
matchCnt = DCount("UserID", "Employees", "Domain=' & cName & '")
MsgBox matchCnt
The following returns no syntax error, but the syntax has changed and the cName variable is directly referenced, and it FINDS A MATCH
Code:
Dim cName As Variant, matchCnt As Integer
cName = "JEFF752"
matchCnt = DCount("UserID", "Employees", "Domain='" & cName & "'")
MsgBox matchCnt
So, the issue is now that DCount is not finding matches when it should be. I prove this with the first code listed above where...
Code:
Dim cName As Variant, matchCnt As Integer
cName = rs.Fields("computer name").Value
msgbox cName
matchCnt = DCount("UserID", "Employees", "Domain=' & cName & '")
MsgBox matchCnt
The msgbox returns... yep.. you guessed it. "JEFF752"... and returns 0 for msgbox matchcnt...
So basically this Dlookup function is pointless.