Hi there,
I have the following code
The problem I have is that this works fine
But this doesn't
there doesn't seem to be any logic to why it doesn't.
Hope someone out there can shed some light
Thanks
Geoff
I have the following code
Code:
Option Compare Database
Option Explicit
Private Declare Function URLDownloadToFile Lib "urlmon" Alias "URLDownloadToFileA" _
(ByVal pCaller As Long, ByVal szURL As String, ByVal szFileName As String, _
ByVal dwReserved As Long, ByVal lpfnCB As Long) As Long
Function Download()
Dim llRetVal As Long
Dim vCircuit
Dim vCircuit_ID As String
Dim strHTML1 As String
Dim strHTML2 As String
Dim strHTML3 As String
Dim strFile As String
Set vCircuit = CurrentDb().OpenRecordset("tblCircuits")
DoCmd.SetWarnings False
Do Until vCircuit.EOF
vCircuit_ID = vCircuit!Circuit_ID
strHTML1 = "http://clr.mcilink.com:8080/clr/048AA4F018FE811A05B902A12C20BA87_"
strHTML2 = "_P_S_Y_Y_Y_Y_Premise_Data.html"
strHTML3 = strHTML1 & vCircuit_ID & strHTML2
strFile = "C:\Documents and Settings\gcodd\Desktop\F&E\Circuit_Info.txt"
llRetVal = URLDownloadToFile(0, strHTML3, strFile, 0, 0)
llRetVal = URLDownloadToFile(0, "http://clr.mcilink.com:8080/clr/048AA4F018FE811A05B902A12C20BA87_W0J62918_P_S_Y_Y_Y_Y_Premise_Data.html", "C:\Documents and Settings\gcodd\Desktop\F&E\Circuit_Info.txt", 0, 0)
The problem I have is that this works fine
Code:
llRetVal = URLDownloadToFile(0, "http://clr.mcilink.com:8080/clr/048AA4F018FE811A05B902A12C20BA87_W0J62918_P_S_Y_Y_Y_Y_Premise_Data.html", "C:\Documents and Settings\gcodd\Desktop\F&E\Circuit_Info.txt", 0, 0)
But this doesn't
Code:
llRetVal = URLDownloadToFile(0, strHTML3, strFile, 0, 0)
there doesn't seem to be any logic to why it doesn't.
Hope someone out there can shed some light
Thanks
Geoff