CurrentDb.Execute "INSERT INTO " & CStr(varTableName) & "SELECT *, '" & Right(CStr(varDbName), InStrRev(varDbName, "\") + 1) & "' As TheAdditionalFieldName FROM " & CStr(varTableName) & " IN " & CStr(varDbName) & ";"
Change "TheAdditionalFieldName" to the actual field name.
"Please, make sure that code you send has a correct syntax as I am not a VB macro expert."
I am not in front of your computer and I do not have your problem in mine so I cannot debug the code. If you do not want my free help, just tell me and I will stop.
The purpose of EE is to provide help to fellow computer users. Not to get others to do able the work for free.