Mysql statement problem

Glenn,
Thank you so much! I’m planning to restructure The code tonight So that the database is a global variable . I appreciate your feedback

Dennis