Home > Archive > MS Access Multiuser > February 2006 > Exporting to a local path









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Exporting to a local path
Lorenzo

2006-02-10, 9:24 am

Hello there,
I have small application that I keep on my local machine but is sometimes
opened and used from another machine simpley by sharing the .mdb file to
another user. I have no needs right now to have a more sofisticated
envirorment so I would like to keep things as they are. I have a problem
though that I am having an hard time resolving:
I am programmatically exporting some access tables/queries from the db to
another database on the same machine and let's say for example in the same
directory where the sending mdb file resides.

This is my routine:
DoCmd.TransferDatabase acExport, "Microsoft Access", _
" G:\Documenti\Access\
Online.mdb", acTable, "tblPrenotazioni", _
"tblPrenotazioni"

It all works ok as long as I am working an my machine but clearly as I run
the same command from a different machine I get an error of object not
found.
I have tried using an absolute path such as \\COMPUTERNAME\PATH \FILE but
does not work.

Do you have an idea on how I can reference the file path from 2 different
machine?
Thanks for your help,
Lorenzo



Larry Linson

2006-02-10, 8:25 pm

Well, the simplest approach is to let the user (who may, it seems, be
yourself) choose the destination using the Windows Common Dialog -- freely
usable code for that can be found at
http://www.mvps.org/access/api/api0001.htm.

Otherwise, you are likely to have to rely on no one ever changing the file
structure. That would mean, even, remembering not to do so yourself.

Larry Linson
Microsoft Access MVP


"Lorenzo"
<CuTT- !thISoFfonlyLeAveMyN
amelorenzoWithNoNuMB
ErS98776@LeaveMyCoun
try!!!ITALIANlodging
.it.NOSPAM>
wrote in message news:uAhIM6kLGHA.2668@tk2msftngp13.phx.gbl...
> Hello there,
> I have small application that I keep on my local machine but is sometimes
> opened and used from another machine simpley by sharing the .mdb file to
> another user. I have no needs right now to have a more sofisticated
> envirorment so I would like to keep things as they are. I have a problem
> though that I am having an hard time resolving:
> I am programmatically exporting some access tables/queries from the db to
> another database on the same machine and let's say for example in the same
> directory where the sending mdb file resides.
>
> This is my routine:
> DoCmd.TransferDatabase acExport, "Microsoft Access", _
> " G:\Documenti\Access\
Online.mdb", acTable, "tblPrenotazioni", _
> "tblPrenotazioni"
>
> It all works ok as long as I am working an my machine but clearly as I run
> the same command from a different machine I get an error of object not
> found.
> I have tried using an absolute path such as \\COMPUTERNAME\PATH \FILE but
> does not work.
>
> Do you have an idea on how I can reference the file path from 2 different
> machine?
> Thanks for your help,
> Lorenzo
>
>
>



Lorenzo

2006-02-16, 7:24 am

Hello Larry,
thanks anyways for your help I have found a way that achieves the same
result but is more suitable for me:

Application.CurrentProject.Path & "\anyfile.mdb"

Thank you!
Lorenzo


"Larry Linson" <bouncer@localhost.not> ha scritto nel messaggio
news:uH9zjtqLGHA.2320@TK2MSFTNGP11.phx.gbl...
> Well, the simplest approach is to let the user (who may, it seems, be
> yourself) choose the destination using the Windows Common Dialog -- freely
> usable code for that can be found at
> http://www.mvps.org/access/api/api0001.htm.
>
> Otherwise, you are likely to have to rely on no one ever changing the file
> structure. That would mean, even, remembering not to do so yourself.
>
> Larry Linson
> Microsoft Access MVP
>
>
> "Lorenzo"
> <CuTT- !thISoFfonlyLeAveMyN
amelorenzoWithNoNuMB
ErS98776@LeaveMyCoun
try!!!ITALIANlodging
.it.NOSPAM>
> wrote in message news:uAhIM6kLGHA.2668@tk2msftngp13.phx.gbl...
>
>



Sponsored Links





Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive | Programming forum archive

Copyright 2008 droptable.com