Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations John Tel on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

MS Web Browser Control

Status
Not open for further replies.

keithvp

Instructor
Aug 10, 2000
19
US
Hello,

I have designed an Access DB that collects data and and extracts it to a text file. I then coded the DB to FTP the text file. In order to make it easier for the user, I inserted a Web Browser Control on the form where the user selects the data.

Originally, the WBC opened to the FTP site in folder view on form_open. However, after the text file had been FTP'd, the WBC would not show the new file had been added.

If I closed Access and opened it up again, I could see the new file in the WBC. I hid the WBC until the FTP was complete and added a timer to delay for 15 seconds in case there was a lag. It would show the new text file after the lag.

However, the user may ftp more than one document in a session. I need to be able to refresh the WBC after each upload. Is there any way I can do this?
 
Why not add a refresh button just like IE or Netscape?
Code:
Private Sub cmdRefresh_Click()
On Error GoTo ErrHandler
  Dim browser As WebBrowser
  Set browser = Me.wbControl.Object
  
  browser.Refresh
  
ExitHere:
  Exit Sub
ErrHandler:
  Debug.Print Err, Err.Description
  Resume ExitHere
End Sub

VBSlammer
redinvader3walking.gif

[sleeping]Unemployed in Houston, Texas
 
Thanks VBSlammer,

However, I did use .Refresh within my code. It would reload the page but not show the additional file. I also tried programming the browser to go to Yahoo then back to the FTP site. I also added a button that specifically would load the FTP site. That would not show the new file uploaded.

I need to literally close access and open it up again to see the new uploaded file within the Web Browser.

It is almost as though it is loaded into a cache that is not cleared upon a refresh or reload of the site.

Keith
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top