Re: Renaming an Access file
VB Code:
Private Sub Command1_Click()
FileCopy "c:\ConnectC.mdb", "C:\newfolder\newfilename.mdb"
End Sub
Re: Renaming an Access file
That changes it for the other program too Hack. ;) (edit: oops, no it doesn't - but it does mean that you aren't working with the same file anymore!)
There is no way of renaming the file without renaming it for all programs... but what it is called should not be an issue for your program.
What code/connection method are you currently using?
Re: Renaming an Access file
He would be working with the exact same file up until the time it was copied. Anything done to the orignial file after the copy would not be carried over to the new file unless the new file was deleted, and then recopied.
But, that should be pretty self-evident.
Re: Renaming an Access file
Agreed.. it just seems to me that the problem is that there is a coding error which is stopping the file from being opened at all. I also think that there is a need to open the same file that the other app is writing to.
We'll have to wait for a reply before we know if that is the case tho!
Re: Renaming an Access file
Quote:
Originally Posted by si_the_geek
We'll have to wait for a reply before we know if that is the case tho!
Yep, agreed.
My impression from the original question was that he wanted to use a database in a VB app he is building that is a part of a canned (probably purchased) application. His application being different from the original.
I've done similar things in the past where my customers wanted reports that the original software package wasn't able to produce, so I sort of "borrowed" the database for my own purposes. :D