Results 1 to 3 of 3
  1. #1
    Join Date
    May 2007

    Unanswered: Can I call an ASP script from Access to upload files?

    Does anyone know if it is possible to call an ASP page on a remote web server and pass it parameters?

    I have an Access 2002 database that I want to use off-line to gather data and images and then upload the lot to a web application running SQL Server. Getting the data into SQL isnt a problem but I need to be able to run a script that will upload the images to a folder on the web server.

    Im running out of hair to pull out on this one, so any help you can give would be greatly appreciated.


  2. #2
    Join Date
    Jan 2007
    California, USA
    You can use the Application.FollowHyperlink method to open a web page. If the web page itself is the .asp code that you want to run, then this will do it for you.

    Application.FollowHyperlink "", , True, True

    Hope this helps,

  3. #3
    Join Date
    May 2007
    Hey Vic,

    Thank you for taking the time to reply. That looks like the solution I need, I hadn't realised you can call a hyperlink from code, but based on your post, I'm planning to use a function something like this:

    Public Function UploadIt(FileName As String)
    Dim strAddress As String

    On Error GoTo Error_UploadIT

    ' Create the hyperlink address.
    strAddress = "" & FileName

    ' Follow hyperlink address.
    Application.FollowHyperlink strAddress, , True, True

    Exit Function

    MsgBox Err & ": " & Err.Description
    Resume Exit_UploadIT
    End Function

    Haven't tested it yet because I now need to modify the asp page to work with querystrings rather than form elements, but I will let you know if it works OK.

    Many Thanks


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts