Access 2007-2019
Access 2000-2003
Access Seminars
TechHelp Support
Tips & Tricks
Access Forum
Course Index
Topic Glossary
Insider Circle
 
Home   News   Courses   Tips   Templates   Forums   Help   Order   Contact   Logon  
 
NEW: Excel Expert 11 - Learn XLOOKUP    dismiss
Tips & Tricks

New Tips Added Weekly!
Click here to get on our Mailing List

   
 
MS Access

Web Browser Control

How to navigate to a different URL based on a subform value

In this tutorial I will explain how to navigate to a URL based on a Subform value.

There was a question on the Forum asking how to update a Web Browser Control with values from a SubForm.

I've created a simple Table with some dummy data, made a continuous Form from that then added it as a Subform to another Form.

This Main Form has a Web Browser Control (WebBrowser1) and an unbound Textbox (URL)

There's a Tip talking about referencing controls.

=Forms!CustomerF!CustomerID
=Forms!CustomerF!OrderSubForm.Form!OrderTotal
=Forms!FormName!FieldName
=Forms!ParentForm!SubForm.Form!FieldName

In this case we are on the Subform and want to update on the Parent so we can use the Parent keyword.

Form_Current()

	Private Sub Form_Current()
		MsgBox ID
		Dim strURL
		strURL = "https://www.google.co.uk/?q=" & ID
		Me.Parent.URL = strURL
		Me.Parent.WebBrowser1.Object.Navigate strURL
	End Sub
	

Let me know if you'd like any additions.

Sample Files
WebBrowser.accdb (Access 2010 .accdb)


 

Alex Hedley (Avatar) By: Alex Hedley


Click here to sign up for more FREE tips

 

You may want to read these articles from the 599CD News:

 

Learn
 
Accessindex
Excelindex
Wordindex
Windowsindex
PowerPointindex
Photoshopindex
Visual Basicindex
ASPindex
Seminars
More...
Customers
 
Account Login
Online Theater
Downloads
Lost Password
Free Upgrades
Insider Circle
Student Databases
Change Email
Info
 
Latest News
New Releases
User Forums
Topic Glossary
Tips & Tricks
Articles
Search The Site
Waiting List
Production Schedule
Collapse Menus
Help
 
Live Chat
Customer Support
WalkThru Tutorials
Troubleshooting
FAQs
TechHelp
Consulting Services
About
 
Background
Testimonials
Jobs
Affiliate Program
Richard Rost
Free Lessons
Mailing List
Order
 
Video Tutorials
Handbooks
MYOLP Memberships
Idiot's Guide to Excel
Volume Discounts
Payment Info
Shipping
Terms of Sale
Gift CDs
Contact
 
Live Chat
General Info
Support Policy
Contact Form
Email Richard
Mailing Address
Phone Number
Fax Number
Course Survey
Facebook    Twitter

YouTube Channel    LinkedIn

Blog RSS Feed