DanielGreenwood
Technical User
I'm in the process of upgrading some databases from 97 to 2003 and doing some general tidying up of the code. Currently there is central switchboard which is used to navigate between various databases on the network. It is coded using send keys to open the 'Open Database' dialogue box then type in the location of the required database and then hit enter.
I really want to change this as I can see many possible problems occuring and its just plain messy!
I've tried using the OpenCurrentDatabase method to open a new database when a button is clicked on the form. However all the code does is close the current dbase then seemingly ignores the new location specified and re-opens the same dbase. This is my (very simple) peice of code:
Dim appNew As New Access.Application
Dim strDBFileLocation As String
strDBFileLocation = "\\server\file\Database.mdb"
appNew.OpenCurrentDatabase (strDBFileLocation)
Is there anything I'm missing here?
Your help is much appreciated