cmd.CommandText = "SELECT top 1 FNAME,FID From {HR_EMPINFO} Where [FNAME] = '" & dr("NAME") & "' order by fid"
或者
cmd.CommandText = "SELECT FNAME,max(FID) From {HR_EMPINFO} Where [FNAME] = '" & dr("NAME") & "' group by FNAME"