Not sure for what you are looking for, but you can use tableId2Name function to get a table name knowing its ID. (.TableId property in the datasource).
It's dificult to give you more help without more precise information of what you want to acomplish, as Query and Form object don't have a direct relation.
Comments
It's dificult to give you more help without more precise information of what you want to acomplish, as Query and Form object don't have a direct relation.
Regards,
http://www.jaestevan.com (AX Dev Blog)
http://twitter.com/jaestevan (follow me!)