Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Modules / DAO / VBA / July 2005

Tip: Looking for answers? Try searching our database.

Open database on network

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Greg - 27 Jul 2005 14:30 GMT
Hello,
I am using the following code to open a database located on another computer
on the network.

Private Sub Command6_Click()
Shell """c:\program files\microsoft office\office11\msaccess.exe"" " &
"""x:\mtds\test.mdb""", vbNormalFocus
DoCmd.Quit
End Sub

Everythig works fine but I have two questions.

1. In order to get the other database to open I have to map the drive. Is
there a way around this? I have tried using the full network path but no luck.

2. Is there a way to open a specific form in the test database without
having to specify the form name in the startup options.

Thanks
Alex Dybenko - 27 Jul 2005 14:41 GMT
Hi,
you can use UNC path instead of mapped drive like:
\\MyServer\MyShare\MyFolder\my/mdb

you can also try to use ShellExecute API:
http://maug.pointltd.com/access/Queries/TipDetail.asp?TipID=5

to open specific form - you can either open mdb with /x switch specifying
macro name which will open your form, or you can try to create a shortcut to
your form and use ShellExecute function to open it

Signature

Alex Dybenko (MVP)
http://Alex.Dybenko.com
http://www.PointLtd.com

> Hello,
> I am using the following code to open a database located on another
[quoted text clipped - 17 lines]
>
> Thanks
Greg - 27 Jul 2005 15:17 GMT
Alex,
UNC path works fine. Can you give me some detail on the /x switch? I am
uncertain how to apply it.
Thanks

> Hi,
> you can use UNC path instead of mapped drive like:
[quoted text clipped - 28 lines]
> >
> > Thanks
Greg - 27 Jul 2005 18:26 GMT
Hello,
Well I have tried the /x command all over the place and still can not get it
to work. I would truely appreciate it if someone could tell me how to apply
the /x switch with a macro name of "test" to the code I submitted in my first
post.
Thanks

> Alex,
> UNC path works fine. Can you give me some detail on the /x switch? I am
[quoted text clipped - 33 lines]
> > >
> > > Thanks
Alex Dybenko - 28 Jul 2005 20:14 GMT
Try to look at Access Help for command line options.
here an extract:
/x macro
Starts Microsoft Access and runs the specified macro. Another way to run a
macro when you open a database is to use an AutoExec macro.

Signature

Alex Dybenko (MVP)
http://Alex.Dybenko.com
http://www.PointLtd.com

> Alex,
> UNC path works fine. Can you give me some detail on the /x switch? I am
[quoted text clipped - 36 lines]
>> >
>> > Thanks
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.