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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Placing a Browser on an Access Form 2

Status
Not open for further replies.

kshadden

IS-IT--Management
Jun 18, 2003
19
US
Is there a way to add a brwoser, i.e., Internet Explorer, as a control on an Access Form. I know through an ActiveX control I can add a program like Microsoft Mappoint and attach it to a table in Access. Can this be done with IE?
 
Uh, sorry, I assumed that the question did not involve how to insert the control.

To insert the control, have your form in design view, click on the insert menu, then Insert ActiveX Control, scroll down to MS WebBrowser, click OK. Make sure you size it properly before you save the form or it wil NOT resize later.

 
Or you could add a command button with this code in the click event...

--Open to the home page designated on the pc--
Shell "c:\program files\internet explorer\iexplore.exe", vbMaximizedFocus

--Open to a specific site--
Shell "c:\program files\internet explorer\iexplore.exe vbMaximizedFocus

Randy
 
Thanks to both of you for your help!!!
 
You may also consider the Application.FollowHyperlink method.

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
I would like to combine this code (which was listed above)
---------------------------------
Shell "c:\program files\internet explorer\iexplore.exe vbMaximizedFocus
---------------------------------

with my code listed below:
--------------------------
Private Sub txtMap_Click()
Dim strPrefix As String, strZip As String, strSuffix As String
strPrefix = "strZip = Me!ZIP1
strSuffix = ""
Application.FollowHyperlink strPrefix & strZip & strSuffix, , True
End Sub
-------------------------

And have it do the following:

1)Open the MAP on my frmMaster in a specific place & specific size window.

Thanks in advance,
jlig
 
Randy , Thanks for the post!

I combined the 2 pieces of code ok, but decided to use the MS WebBrowser activeX module instead.

Do you know how I can add my variables ...?
-----------------------------------------
Private Sub txtMap_Click()
Dim strPrefix As String, strAddress As String, strCityPrefix, strStatePrefix As String, strCity As String, strState As String, strZipPrefix As String, strZip As String, strSuffix As String

strPrefix = "
strAddress = Me!ADD1
strCityPrefix = "&city="
strCity = Me!CITY1
strStatePrefix = "&state="
strState = Me!STATE1
strZipPrefix = "&zipcode="
strZip = Me!ZIP1

strSuffix = ""
Application.FollowHyperlink strPrefix & strAddress & strCityPrefix & strCity & strStatePrefix & strState & strZipPrefix & strZip & strSuffix, , True
End Sub
------------------------------


To this command listed below..?
-------------------------------
Me.WebBrowser1.navigate "
This command by itself works great! It perfectly opens up the Web browser on my Form, with scoll bars if needed.

I just want to add my variables.
Thanks again,
jlig
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top