Open a new database from inside access

Nope, apparently that is against ARMY policy.........I think I am going to have to make this a 2 part thing, first button creates copies and then you have to go into the unlinked copy an hit the unlink button to unlink all the tables. Unless there is another way to create an editable copy from code.
 
Nope, apparently that is against ARMY policy.........I think I am going to have to make this a 2 part thing, first button creates copies and then you have to go into the unlinked copy an hit the unlink button to unlink all the tables. Unless there is another way to create an editable copy from code.
Hi. As I mentioned in post #18, there are several possible approaches to get to the same end result. What you're proposing now is one of them. I would agree that it's worth trying out. Let us know if the code works once you have moved it to the backup copy, and we'll help you automate that part then. Good luck!
 
Nope, apparently that is against ARMY policy.........I think I am going to have to make this a 2 part thing, first button creates copies and then you have to go into the unlinked copy an hit the unlink button to unlink all the tables. Unless there is another way to create an editable copy from code.
By the way, the code I gave you was developed and tested within the NMCI network. The SharePoint site is hosted by DISA. Just letting you know...
 
Hi. As I mentioned in post #18, there are several possible approaches to get to the same end result. What you're proposing now is one of them. I would agree that it's worth trying out. Let us know if the code works once you have moved it to the backup copy, and we'll help you automate that part then. Good luck!
Just FYI, here's what the code might look like when ran from within the backup file.
Code:
Public Function SP2Local() As Boolean
'thedbguy@gmail.com
'10/29/2021
'converts SharePoint linked tables to local tables

Dim db As DAO.Database
Dim tdf As DAO.TableDef

Set db = CurrentDb()

For Each tdf In db.TableDefs
    With tdf
        If InStr(.Connect, "ACEWSS") > 0 Then
            DoCmd.SelectObject acTable, .Name, True
            DoCmd.RunCommand acCmdConvertLinkedTableToLocal
           
        End If
    End With
Next

MsgBox "All done!", vbInformation, "Info"

Set tdf = Nothing
Set db = Nothing

End Function
Hope that helps...
 
Thank you for all the help. Took me all week to realize that I couldn't do it in 1 button and only 15 min to actually create both buttons and have it working.
 
Thank you for all the help. Took me all week to realize that I couldn't do it in 1 button and only 15 min to actually create both buttons and have it working.
Congratulations! You might consider sharing your solution in case it might help others with the same need in the future.

Good luck with your project.
 

Users who are viewing this thread

Back
Top Bottom