This sounds strange. Why are you creating a button for each table? And do you have any code yet?