changed qryRsrc to use passed in parameter