Results 1 to 8 of 8
  1. #1
    somewageslave is offline Novice
    Windows 7 64bit Access 2013 64bit
    Join Date
    Jan 2018
    Posts
    5

    Save a Copy of Entire DB

    Hi guys! I'm new here and I recently got into a job that requires me to use Access... a lot. I'm looking for a little help, as I am deathly afraid of accidentally writing over the existing DB and reports/queries. I technically have two questions:




    1.) How to save an entirely new copy of an existing DB (I've tried this already, but it seems to keep opening the old document so I'm afraid it's pulling from the same source).


    2.) How to add a new field to all existing reports (for example, I have a report that shows a client's Name/Address/Age, but I now want to add new columns that will show the Client ID number and another column that might show something like a link to another report for overdue fees that this client has owed).
    How might I go about doing this?


    I have attached a little picture showing what the main page for the Access DB looks like.


    Thank you gents!Click image for larger version. 

Name:	Access DB Reports Menu.png 
Views:	10 
Size:	13.1 KB 
ID:	32178

  2. #2
    ranman256's Avatar
    ranman256 is offline VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,549
    Code:
    sub BackupDb()
    vSrc = currentdb.name
    
    i = InStrRev(vSrc, "\")          
    If i > 0 Then
      vDir = Left(vSrc, i)
      vDb = Mid(vSrc, i + 1)
    else
      msgbox "Error"
      exit sub
    end if
    
    
    vTarg = vBackupDir & vDb 
    
    
    filecopy vSrc, vTarg
    end sub

  3. #3
    somewageslave is offline Novice
    Windows 7 64bit Access 2013 64bit
    Join Date
    Jan 2018
    Posts
    5
    I'm so sorry - I'm very new at this. I can only assume those are SQL commands? Can you please tell me how I should use them?

  4. #4
    ranman256's Avatar
    ranman256 is offline VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,549
    no, these are vb commands.
    they go in a button click event, or called by a macro

  5. #5
    June7's Avatar
    June7 is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,632
    No, that is VBA which is very different from SQL.

    What exactly did you do to make copy of db? I really don't know what you mean by 'keep opening old document'. Since it's a copy, both files have the same 'documents'.

    Add field/column by opening objects in design view and modifying.

    Have you completed any tutorials - online or book? A forum is not the proper medium for learning basics.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  6. #6
    somewageslave is offline Novice
    Windows 7 64bit Access 2013 64bit
    Join Date
    Jan 2018
    Posts
    5
    I just hit "Save As" to copy the entire document and have been opening it from the new document instead. However, even if I do that, it still shows the old DB's name and not the new name that I chose for it. I hope that makes sense.

    I've been doing some tutorials and I can do the basics, such as adding new columns/keys to entries, etc., but I haven't quite gotten to the VBA or SQL portions yet (which the current DB uses).

    Thanks for the help!

  7. #7
    June7's Avatar
    June7 is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,632
    Do you mean the name that shows on the application header above the ribbon?

    The file name is not necessarily the same as the database name (title).

    File > Options > Current Database > Application Options > Application Title

    And how are you opening the database - directly by clicking the file in Windows Explorer or from a shortcut?
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  8. #8
    somewageslave is offline Novice
    Windows 7 64bit Access 2013 64bit
    Join Date
    Jan 2018
    Posts
    5
    Ah, you're right. So this is an entirely separate copy that just happens to have the same application title name. I'll change that so as not to confuse myself in the future.

    Thank you gents!

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Macro to save entire database as runtime
    By Chky071 in forum Access
    Replies: 6
    Last Post: 08-08-2016, 08:21 AM
  2. Replies: 1
    Last Post: 11-07-2013, 11:15 AM
  3. Replies: 1
    Last Post: 07-02-2013, 08:39 AM
  4. Copy Paste the entire MS Access Database
    By mkc80 in forum Access
    Replies: 6
    Last Post: 08-24-2012, 01:07 PM
  5. Copy Entire Record
    By pcli in forum SharePoint
    Replies: 8
    Last Post: 04-23-2012, 03:48 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums