Re: Save a File from a Text Box



Alex, Thank you for your response.
Do you have any examples I can look at? I keep getting errors. I tred to use
the FileCopy for saving to a drive "H:\" but it did not work.

Function Upload()
Dim myPath As String
Dim mySharePoint As String
myPath = Form_f_GetFileandLocation.LocationFile1.Value
mySharePoint = "H:\"
FileCopy myPath, mySharePoint
End Function

The above code gives me
Run-time error '52':
Bad file name or number

I also would definately need an API example to FileCopy/SaveAs to a URL
"http://Intranet"; using the path&filename found in
"Form_f_GetFileandLocation.LocationFile1.Value".

Thank you
Stephen

"Alex Dybenko" wrote:

Hi,
I think you can just copy it, try to use FileCopy statement.

For HTTP://Intranet it is more tricky, you have to use API functions to
upload file for HTTP or FTP, much easier if you can also use UNC path and
copy file

--
Best regards,
___________
Alex Dybenko (MVP)
http://accessblog.net
http://www.PointLtd.com

"Stephen sjw_ost" <Stephensjwost@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:AAAA2503-30EC-4639-8F40-623A72DE58E1@xxxxxxxxxxxxxxxx
I have a Text Box on a Form that contains the full filepath and filename
of
the users choice. How can programically I use the filepath & filename,
from
the Text Box, to save the indicated file to a shared drive (Z:\) or shared
point (HTTP://Intranet)?

Thank you for any help.
Stephen

.



Relevant Pages

  • Re: Save a File from a Text Box
    ... Dim myPath As String ... Dim mySharePoint As String ... FileCopy myPath, mySharePoint ... "Alex Dybenko" wrote: ...
    (microsoft.public.access.modulesdaovba)
  • Re: FileCopy Fails, but Inconsistently
    ... Sorry, Alex, I don't quite follow that one. ... The database where my FileCopy ... Path2 & "Tools Update Status.mdb" ...
    (microsoft.public.access.modulesdaovba)
  • Re: Save a File from a Text Box
    ... When I am stepping thru the code, I can move my cursor over the myPath & ... mySharePoint to see the results. ... perhaps access needs to verify them both before the FileCopy operation can ... I would like the functions to explicitly verify both the source and ...
    (microsoft.public.access.modulesdaovba)
  • Re: FileCopy Fails, but Inconsistently
    ... Best regards, ... Alex Dybenko (MVP) ... "Alex Dybenko" wrote: ... then filecopy is failed ...
    (microsoft.public.access.modulesdaovba)

Loading