I'm not an expert, but you've got several things going on there, when I hit problems like you have I strip it back, therefore in a VBA window, I'd do this...
myTest = DCount("[ContactId]","qryAppendimportContacts")
debug.print myTest
...& see what you have, if you get a number returned then...