Results 1 to 10 of 10
  1. #1
    2 Star Lounger
    Join Date
    Jan 2003
    Location
    Dallas, Texas
    Posts
    139
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Show a Webpage on a form (2002)

    I am either missing some of the help function, or I am just not asking the right questions. I asked how to display a webpage. I got the instructions for putting the Microsoft Web Browser on a form. I did that. Now I have this pretty picture of the Microsoft Windows Logo. How do I show the Webpage. None of the questions I tried gave me any further information,
    <img src=/S/confused.gif border=0 alt=confused width=15 height=20>

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Show a Webpage on a form (2002)

    You need a bit of code to do this. Say that the control is named WebBrowser0. The following instruction will load the WOPR front page into the browser:

    Me.WebBrowser0.Object.Navigate "www.wopr.com"

    You can call code like this in the On Load event of the form, if you want to display a fixed web page. You can also provide a text box in which the user can enter a web address, and a command button.

    Private Sub cmdBrowse_Click()
    On Error GoTo ErrHandler
    Me.WebBrowser0.Object.Navigate Me.txtAddress
    Exit Sub

    ErrHandler:
    MsgBox Err.Description, vbExclamation
    End Sub

  3. #3
    2 Star Lounger
    Join Date
    Jan 2003
    Location
    Dallas, Texas
    Posts
    139
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Show a Webpage on a form (2002)

    Thanks Hans.
    I'll give this a try right away. You are AWESOME!

  4. #4
    Silver Lounger
    Join Date
    Jun 2002
    Location
    Cheadle, Staffordshire
    Posts
    2,177
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Show a Webpage on a form (2002)

    <P ID="edit" class=small>(Edited by D Willett on 20-Nov-03 16:10. It now resizes)</P>Hans
    I just tried your example, which works fine.
    Only one thing, the size of the control is very small, about 2cm width and 3cm height.
    Adjusting manually or by the properties doesn't make any difference !

    Can this control be adjusted ?
    Strange, after a few attempts, It is now sized to the size I require !!

  5. #5
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Show a Webpage on a form (2002)

    Dave,

    I don't know why that happens. The control always starts out at a ridiculously small size, dragging a large rectangle when creating the control doesn't work. But once created, you can drag it to the desired size.

    It's a nuisance, but not really serious.

  6. #6
    Silver Lounger
    Join Date
    Jun 2002
    Location
    Cheadle, Staffordshire
    Posts
    2,177
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Show a Webpage on a form (2002)

    Thanks Hans

    And I thought it as just me !

  7. #7
    2 Star Lounger
    Join Date
    Sep 2002
    Location
    Chicago, Illinois, USA
    Posts
    116
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Show a Webpage on a form (2002)

    I tried this - placing Me.WebBrowser0.Object.Navigate "www.wopr.com" in the OnLoad event of a form - using Access 97 and got error 2683: "There is no object in this control"
    I was able to place the Microsoft Web Browser control on the form, but can't get it to display anything.
    Also, after attempting to open the form and seeing the error message, when I open the form in design view I see that the custom properties of the Web Browser control have vanished. Back in form view, the Microsoft logo has disappeared.
    Does this control not work in Access 97?

  8. #8
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Show a Webpage on a form (2002)

    I'm afraid you're out of luck. Access 97 was created in the time of Internet Explorer 3. Newer versions of IE come with newer versions of the WebBrowser control, but Access 97 doesn't recognize them. See <!mskb=177105>Microsoft Knowledge Base Article 177105<!/mskb>.

  9. #9
    2 Star Lounger
    Join Date
    Sep 2002
    Location
    Chicago, Illinois, USA
    Posts
    116
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Show a Webpage on a form (2002)

    Hans,
    Thanks for the prompt reply. I probably would have spent hours trying to get it to work by fooling with all the custom property settings. You have saved me a lot of grief and time.

  10. #10
    2 Star Lounger
    Join Date
    Jan 2003
    Location
    Dallas, Texas
    Posts
    139
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Show a Webpage on a form (2002)

    And here is the answer to the next question I was going to ask. Back to fool with it some more. If you can make it bigger, I WILL make it bigger.
    Thanks again guys.

Posting Permissions

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