https://bytes.com/topic/access/answe...command-button
Phil suggested I create a table then loop through the table, my issue is I do not know how to do that through code.
I made a table Called "DBUpdater" with 2 columns Col 1 is ID and Col 2 is "Sendto
Col 1 is an auto number
Col 2 is short text
I entered in col 2 "Assembly OEE Database-(Name)" - This is what the file needs to be renamed to.
I'm not sure where I need to go from here.
Here is the code I have so far to excute just one file:
Expand|Select|Wrap|Line Numbers
- Private Sub cmdCopy_Click()
- Dim strPath As String
- Dim strFromFile As String
- Dim strToFile as String
- strPath = "G:\Unsecure-Share\ASM OEE Files\"
- strFromFile = strPath & _
- "Data Tables\Assembly OEE Database-Admin.accdb"
- strToFile = strPath & _
- "Assembly OEE Database-Brian Pritchett.accdb"
- Call FileCopy(strFromFile, strToFile)
- End Sub