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 / General 1 / May 2008

Tip: Looking for answers? Try searching our database.

trying to use windoze UNC in VBA to reach files in share points?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
MLH - 26 May 2008 06:24 GMT
I tried this in a module...

call lineinputthing("\\MLH\Shared Docs\Leads.txt","26MAY08Garages")

The machine name is MLH. The share name is "Shared Docs". The file
name is Leads.txt. But VBA does not understand
\\MLH\Shared Docs\Leads.txt.

The actual location of the share is
C:\Documents and Settings\All Users\Shared Docs\
but windoze does not let you address it directly within a command
window. You can't even cd to Shared Docs from
C:\Documents and Settings\All Users\

You can do dir Shared Docs from C:\Documents and Settings\All Users\
Yes, that'll give you a DIR listing.

The lineinputthing procedure is a sub expecting 2 string arguments.
And the first of them is a text file. The text file is Leads.txt. If
Leads.txt is saved in c:\mystuf\ - then there is no problem at all.
It's just the UNC that I can't seem to get VBA to understand.

How does one refer to share points using UNC or other name convention?
Ideas? Comments?
Rick Brandt - 26 May 2008 13:13 GMT
> I tried this in a module...
>
[quoted text clipped - 3 lines]
> name is Leads.txt. But VBA does not understand
> \\MLH\Shared Docs\Leads.txt.

Since you have spaces in the path you probably need to pass a quoted path to
your function...

Chr(34) & "\\MLH\Shared Docs\Leads.txt" & Chr(34)

Signature

Rick Brandt, Microsoft Access MVP
Email (as appropriate) to...
RBrandt   at   Hunter   dot   com

MLH - 26 May 2008 14:30 GMT
>> I tried this in a module...
>>
[quoted text clipped - 8 lines]
>
>Chr(34) & "\\MLH\Shared Docs\Leads.txt" & Chr(34)

Unfortunately not. No, it produces a 3078 error ...
The Microsoft Jet database engine cannot find the input table or query
'26MAY08Garages"'

Notice that it thinks the table name is 26MAY08Garages" ==> with a dbl
quote at the end.
Rick Brandt - 26 May 2008 14:44 GMT
>>> I tried this in a module...
>>>
[quoted text clipped - 15 lines]
> Notice that it thinks the table name is 26MAY08Garages" ==> with a dbl
> quote at the end.

I fail to see how what I suggested would have any bearing on how your second
argument is interpretted.  I only suggested that the first argument be so
wrapped.

Signature

Rick Brandt, Microsoft Access MVP
Email (as appropriate) to...
RBrandt   at   Hunter   dot   com

MLH - 27 May 2008 15:11 GMT
>>>> I tried this in a module...
>>>>
[quoted text clipped - 19 lines]
>argument is interpretted.  I only suggested that the first argument be so
>wrapped.

Big oops. My fault. Unfortunately the Chr$(34) wrappers didn't
do the trick - applying them as you suggested this time. Line
that failed:   Open MyTextDiskFile For Input As #1

Oh well. I tried. Thx, Rick.
 
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.