This is driving me crazy. I have a button that maps a network drive. Here is the code:
Dim objNetwork
Dim fs As Object
Set objNetwork = CreateObject("WScript.Network")
Set fs = CreateObject("Scripting.FileSystemObject")
objNetwork.MapNetworkDrive "I:", "\\10.100.1.10"
The first time I click on the button (when the network drive is not yet mapped), it maps the drive just fine, but then I get this error message:
"The command or action " isn't available now"
* You may be in a read-only database or an unconverted database from an earlier version of Microsoft Access
* The type of object the action applies to isn't currently selected or isn't in the active view.
The database isn't read-only and it's an Access 2007 database created from scratch.
Now if I click on the button again (when the drive is already mapped), no error message. This is incredibly frustrating because on 4 of my machines (which are running identical versions of Windows 7, Access, etc.), there is never an error. But for some reason on a brand new machine I just installed last night, I am getting this error.
Any help would be GREATLY appreciated!!
Dim objNetwork
Dim fs As Object
Set objNetwork = CreateObject("WScript.Network")
Set fs = CreateObject("Scripting.FileSystemObject")
objNetwork.MapNetworkDrive "I:", "\\10.100.1.10"
The first time I click on the button (when the network drive is not yet mapped), it maps the drive just fine, but then I get this error message:
"The command or action " isn't available now"
* You may be in a read-only database or an unconverted database from an earlier version of Microsoft Access
* The type of object the action applies to isn't currently selected or isn't in the active view.
The database isn't read-only and it's an Access 2007 database created from scratch.
Now if I click on the button again (when the drive is already mapped), no error message. This is incredibly frustrating because on 4 of my machines (which are running identical versions of Windows 7, Access, etc.), there is never an error. But for some reason on a brand new machine I just installed last night, I am getting this error.
Any help would be GREATLY appreciated!!
Last edited: