Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Microsoft Office > Access and Access VBA > Access
Password Reminder
Register
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
Access Discussion of Microsoft Access database design and programming. See also the forums for Access ASP and Access VBA.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Access section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old December 9th, 2005, 05:02 PM
Registered User
 
Join Date: Dec 2005
Location: , , .
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default Microsoft Web Browser used in MS Access Form

I'm trying to view the yahoo page in a ms access form. I've written the following code to view yahoo when the form is loaded using the Microsoft Web Browser (activeX) control, however, the yahoo page isn't showing. Does anyone now what is causing this problem and how I can fix it?

Public Sub Form_Load()
Me!WebBrowser1.Navigate "http://www.yahoo.com"
End Sub

Thx

Reply With Quote
  #2 (permalink)  
Old December 9th, 2005, 05:08 PM
Friend of Wrox
 
Join Date: Oct 2004
Location: Clinton, UT, USA.
Posts: 564
Thanks: 0
Thanked 4 Times in 4 Posts
Default

Try this...

Public Sub Form_Load()
    Dim strURL as String
    Dim objIE as Object

    strURL = "http://www.yahoo.com"
    Set objIE = Me.WebBrowser1.Object
    objIE.Navigate strURL
End Sub

Mike
EchoVue.com
Reply With Quote
  #3 (permalink)  
Old December 9th, 2005, 05:12 PM
Registered User
 
Join Date: Dec 2005
Location: , , .
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi Mike ... I tried your code, but it didn't work for me ... does it work for you?

Reply With Quote
  #4 (permalink)  
Old December 9th, 2005, 05:18 PM
Registered User
 
Join Date: Dec 2005
Location: , , .
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Mike ... your code is identical to my code. It seems that the problem I'm having is that the activex control is being activated when the form is loaded ... does anyone know what is causing this?

Reply With Quote
  #5 (permalink)  
Old December 9th, 2005, 05:25 PM
Friend of Wrox
 
Join Date: Oct 2004
Location: Clinton, UT, USA.
Posts: 564
Thanks: 0
Thanked 4 Times in 4 Posts
Default

Mine works in a couple of other apps I have.

If the code is in the Form_Load module, it will always activate when the form is loaded. If you would like it to activate on a button click or something similar, you would want to move it to the sub for the associated event.

One thing that might be making a difference is whatever name you have assigned to the ActiveX control. I think ocxBrowser might be the default name.



Mike
EchoVue.com
Reply With Quote
  #6 (permalink)  
Old December 9th, 2005, 06:20 PM
Registered User
 
Join Date: Dec 2005
Location: , , .
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Mike... how can I confirm the name of the Web Browser? I did it by inserting the web browswer into Excel and reading the name from the NameBox .. Is there another way?

Reply With Quote
  #7 (permalink)  
Old December 9th, 2005, 06:59 PM
Friend of Wrox
 
Join Date: Oct 2004
Location: Clinton, UT, USA.
Posts: 564
Thanks: 0
Thanked 4 Times in 4 Posts
Default

Just right click the control, choose Properties and look at the Name property.

Mike
EchoVue.com
Reply With Quote
  #8 (permalink)  
Old December 9th, 2005, 07:12 PM
Registered User
 
Join Date: Dec 2005
Location: , , .
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I finally got it to work .. thxs

Reply With Quote
  #9 (permalink)  
Old December 9th, 2005, 07:17 PM
Friend of Wrox
 
Join Date: Oct 2004
Location: Clinton, UT, USA.
Posts: 564
Thanks: 0
Thanked 4 Times in 4 Posts
Default

Anytime!! And welcome to the Forum

Mike
EchoVue.com
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
MS Access Form Bind With OO4O MTForm Access VBA 4 February 27th, 2008 04:29 PM
MS ACCESS + Microsoft Visual Studio neha2007 Visual Studio 2005 0 June 15th, 2007 09:55 AM
Print web form in browser Roy Ng ASP.NET 1.0 and 1.1 Professional 1 July 15th, 2005 03:42 PM
View MS Access Reports in Browser minic Classic ASP Databases 0 December 14th, 2004 02:38 AM



All times are GMT -4. The time now is 08:28 PM.


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.