OnCellEdit with table name as a variable

Happy Friday! I have an "OnCellEdit script;
id = self.data.getValueAt(rowIndex, ‘ID’) #Get the id of the database column.
query = “UPDATE [Quotes_VE30].[dbo].Q3001312_Materials SET [%s] = ? WHERE id = ?” % (colName)
args = [newValue, id]
system.db.runPrepUpdate(query, args)
That works as expected. But, I need to have the table name be a variable. Try as I might, I can’t get anything to work! The “Q3001312” portion of the table name is selected via a drop down box.

Any ideas? and thanks!