Question : Add the name of the Access database in a new column

Hi,

 I need urgently a simple vb macro code which would add the name of the Access database into a new column.
Example ->  I have one database with 5 tables.
I need to add a new column into each table with the value containing the name of the current  database.

Thanks.

Answer : Add the name of the Access database in a new column

Application.CurrentProject.Name
will give you the name of the current database. Since you get this very easily, I can't understand why you would want to store it in a table but you can put it in an update query like this:
CurrentDB.Execute "UPDATE YourTableName SET YourFieldName =" &  Application.CurrentProject.Name
Random Solutions  
 
programming4us programming4us