Results 1 to 2 of 2
  1. #1
    Join Date
    Jul 2010
    Posts
    1

    Unanswered: Add db name to table

    Hello,

    I have 89 databases (all same schemas) that I want to merge into one. But first I will need to add the name of the database as an attribute. For example, each database name is a map number and I will need that map number as an attribute in one of my tables.

    I cannot figure out how to do this! It must be simple! I've tried db_name() but it says it is an unrecognized function.

    Help?!?

  2. #2
    Join Date
    May 2010
    Posts
    601
    Quote Originally Posted by enhunter View Post
    Hello,

    I have 89 databases (all same schemas) that I want to merge into one. But first I will need to add the name of the database as an attribute. For example, each database name is a map number and I will need that map number as an attribute in one of my tables.

    I cannot figure out how to do this! It must be simple! I've tried db_name() but it says it is an unrecognized function.

    Help?!?
    Try using:

    CurrentProject.Name

    Example:

    Code:
    
    Print CurrentProject.Name
    WorkTrack_Demo.accdb
    Boyd Trimmell aka HiTechCoach HiTechCoach.com (free access stuff)
    Microsoft MVP - Access Expert
    BPM/Accounting Systems/Inventory Control/CRM
    Programming: Nine different ways to do it right, a thousand ways to do it wrong.
    Binary--it's as easy as 1-10-11

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •