Private Sub cmdTester_Click()
On Error GoTo Err_cmdTester_Click
Dim strQRY, varcount, qd as Dao.querydef
strQRY = "SELECT * FROM tbl_External IN 'C:\datastores\myExternalDatabase.mdb';"
set qd=currentdb.createquerydef("myQ",strQRY)
varcount = DCount("*", "myQ")
If varcount = 0 Then
MsgBox ("it's empty")
Else
MsgBox (varcount)
End If
Exit_cmdTester_Click:
Exit Sub
Err_cmdTester_Click:
MsgBox Err.Description
Resume Exit_cmdTester_Click
End Sub