![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
I'm using the following code in Access 2002 to open a report in an external db. Dim objAccess As Access.Application Set objAccess = New Access.Application With objAccess .OpenCurrentDatabase "\\server\dpcman\cheques.mdb" .DoCmd.OpenReport strReport, acViewPreview, , , , gblPropNum End With An error 7866 (Can't open the database because it is missing or opened exclusively by another user...") is generated at the line ".OpenCurrentDatabase.." If I substitute that line for: .OpenCurrentDatabase "c:\dpc manager 10\cheques.mdb" (which on my development PC is the same path) it works fine. The Help screen for 'OpenCurrentDatabase' indicates that UNC can be used. Is there any reason I can't use UNC in this context? If so, is there a way to resolve the UNC path to generate the mapped path? Maybe the UNC path is incorrect? |
#3
| |||
| |||
|
|
I'm using the following code in Access 2002 to open a report in an external db. Dim objAccess As Access.Application Set objAccess = New Access.Application With objAccess .OpenCurrentDatabase "\\server\dpcman\cheques.mdb" .DoCmd.OpenReport strReport, acViewPreview, , , , gblPropNum End With An error 7866 (Can't open the database because it is missing or opened exclusively by another user...") is generated at the line ".OpenCurrentDatabase.." If I substitute that line for: .OpenCurrentDatabase "c:\dpc manager 10\cheques.mdb" (which on my development PC is the same path) it works fine. The Help screen for 'OpenCurrentDatabase' indicates that UNC can be used. Is there any reason I can't use UNC in this context? |
#4
| |||
| |||
|
|
Bob Darlington wrote: I'm using the following code in Access 2002 to open a report in an external db. Dim objAccess As Access.Application Set objAccess = New Access.Application With objAccess .OpenCurrentDatabase "\\server\dpcman\cheques.mdb" .DoCmd.OpenReport strReport, acViewPreview, , , , gblPropNum End With An error 7866 (Can't open the database because it is missing or opened exclusively by another user...") is generated at the line ".OpenCurrentDatabase.." If I substitute that line for: .OpenCurrentDatabase "c:\dpc manager 10\cheques.mdb" (which on my development PC is the same path) it works fine. The Help screen for 'OpenCurrentDatabase' indicates that UNC can be used. Is there any reason I can't use UNC in this context? If so, is there a way to resolve the UNC path to generate the mapped path? Maybe the UNC path is incorrect? http://www.wiredbox.net/forum/Thread..._drive_le.aspx |
#5
| |||
| |||
|
|
I'm using the following code in Access 2002 to open a report in an external db. Dim objAccess As Access.Application Set objAccess = New Access.Application With objAccess .OpenCurrentDatabase "\\server\dpcman\cheques.mdb" .DoCmd.OpenReport strReport, acViewPreview, , , , gblPropNum End With An error 7866 (Can't open the database because it is missing or opened exclusively by another user...") is generated at the line ".OpenCurrentDatabase.." If I substitute that line for: .OpenCurrentDatabase "c:\dpc manager 10\cheques.mdb" (which on my development PC is the same path) it works fine. The Help screen for 'OpenCurrentDatabase' indicates that UNC can be used. Is there any reason I can't use UNC in this context? If so, is there a way to resolve the UNC path to generate the mapped path? -- Bob Darlington Brisbane |
#6
| |||
| |||
|
|
Thanks Salad. I had tested that with Dir() and all is OK. The UNC path is correct or you can open the database with the UNC path? |
#7
| |||
| |||
|
|
I was testing the code on my development PC which is also the 'server' so that the UNC path (which tests OK) doesn't seem to like refering to a UNC address which is on the same PC. |
#8
| |||
| |||
|
|
"Bob Darlington" <bob (AT) notheredpcman (DOT) com.au> wrote in news:4cc61db8$0$25361$afc38c87 (AT) news (DOT) optusnet.com.au: I was testing the code on my development PC which is also the 'server' so that the UNC path (which tests OK) doesn't seem to like refering to a UNC address which is on the same PC. I have never seen that. I do note that sometimes Windows Explorer will convert a UNC path to its local equivalent (which is quite annoying), but that's Windows Explorer, and not really relevant to how Access/Jet/ACE handles UNC paths. There might be firewall settings that interfere with it, though. -- David W. Fenton http://www.dfenton.com/ contact via website only http://www.dfenton.com/DFA/ |
![]() |
| Thread Tools | |
| Display Modes | |
| |