Hollis,Virginia
HollisVJ at pgdp.usec.com
Mon Feb 2 12:17:44 CST 2004
Ok, I took out the "If..." and you're right it works fine without it. In fact it now works in XP. It would stop at the If statement with the error "bad file name or number". It seems funny I have been using it all this time in Win98 & it has worked. Thank you very much! I am glad it was such a simple fix too. Va. -----Original Message----- From: Heenan, Lambert [mailto:Lambert.Heenan at aig.com] Sent: Monday, February 02, 2004 11:07 AM To: 'Access Developers discussion and problem solving' Subject: RE: [AccessD] Code Not Working in XP What is this code supposed to be doing? See my comment within it... strPath = " http://web.com/vr.asp?xml=orafin%2Stock= strFile = strPath & Me.StockNumber ' This next line is feeding a URL for a web page to the Dir() function ??? ' Surely it always returns "" or errors out? If Dir(strFile) = "" Then ' The effect of the next line is to set strFile equal to what it was already set to two lines of code earlier. strFile = strPath & Me.StockNumber End If Call fHandleFile(strFile, WIN_MAX) So, as the If Then part of this code does not actually do anything, the problem must be either in the fHandleFile routine or in you error handler (if there is one). Have you tried stepping through the code so see what is failing to run? Also, if you use fHandleFile() as the function that it actually is, you'll be able to see any error message it returns. e.g. MsgBox fHandleFile(strFile, WIN_MAX) Lambert