Displaying proper web site for record

Hi,

I would like to have the proper web site display inside the Web Browser 
control on a form when I am navigating through records. The url is in a text 
field with the table associated with the form. So far I have only been able 
to get the web site to appear by visibly placing the url on the form in a 
text and using a on click event as such:

Private Sub Homepage_Click()
    WebBrowser2.Navigate (Homepage.Text)
End Sub

Not very elegant but I cannot figure how to get access to do this on its own 
when I change records.

Thanks for the help, Steve.


0
Steve
2/16/2008 10:30:40 AM
access.forms 6864 articles. 2 followers. Follow

5 Replies
561 Views

Similar Articles

[PageSpeed] 28

Steve,
try setting your textbox format to hyperlink. (properites dialog | format 
tab | Is Hyperlink  - towards bottom of list)

If the url is stored in a table in a hyperlink field, you can just click the 
url in the textbox if the form and the textbox are bound.

Jeanette Cunningham

"Steve" <abc@123.com> wrote in message 
news:O8Cb4bIcIHA.3572@TK2MSFTNGP02.phx.gbl...
> Hi,
>
> I would like to have the proper web site display inside the Web Browser 
> control on a form when I am navigating through records. The url is in a 
> text field with the table associated with the form. So far I have only 
> been able to get the web site to appear by visibly placing the url on the 
> form in a text and using a on click event as such:
>
> Private Sub Homepage_Click()
>    WebBrowser2.Navigate (Homepage.Text)
> End Sub
>
> Not very elegant but I cannot figure how to get access to do this on its 
> own when I change records.
>
> Thanks for the help, Steve.
>
> 


0
Jeanette
2/16/2008 11:19:45 AM
"Steve" <abc@123.com> wrote in message 
news:O8Cb4bIcIHA.3572@TK2MSFTNGP02.phx.gbl...
> Hi,
>
> I would like to have the proper web site display inside the Web Browser 
> control on a form when I am navigating through records. The url is in a 
> text field with the table associated with the form. So far I have only 
> been able to get the web site to appear by visibly placing the url on the 
> form in a text and using a on click event as such:
>
> Private Sub Homepage_Click()
>    WebBrowser2.Navigate (Homepage.Text)
> End Sub
>
> Not very elegant but I cannot figure how to get access to do this on its 
> own when I change records.
>
> Thanks for the help, Steve.

So what you want is the browser control to display the web page associated 
with a record, without user intervention? If so, simply move your code to 
the form's OnCurrent event. The OnCurrent event fires as each fresh record 
becomes the "current" record, ie the one that is currently shown.


0
Stuart
2/16/2008 12:14:26 PM
> I would like to have the proper web site display inside the Web Browser 
> control on a form when I am navigating through records. The url is in a 
> text field with the table associated with the form. So far I have only 
> been able to get the web site to appear by visibly placing the url on the 
> form in a text and using a on click event as such:
>
> Private Sub Homepage_Click()
>    WebBrowser2.Navigate (Homepage.Text)
> End Sub
>
>> So what you want is the browser control to display the web page 
>> associated with a record, without user intervention? If so, simply move 
>> your code to the form's OnCurrent event. The OnCurrent event fires as 
>> each fresh record becomes the "current" record, ie the one that is 
>> currently shown.

I tried as such with this code:

Private Sub Form_Current()
    WebBrowser2.Navigate (Homepage.Text)
End Sub

But receive the following error message:

"You can't reference a property or method for a control unless the
control has the focus."

I would prefer  to not even have the URL showing on the form.

Thanks, Steve 


0
Steve
2/16/2008 4:48:30 PM
"Steve" <abc@123.com> wrote in message 
news:uZX0AvLcIHA.748@TK2MSFTNGP04.phx.gbl...
>> I would like to have the proper web site display inside the Web Browser 
>> control on a form when I am navigating through records. The url is in a 
>> text field with the table associated with the form. So far I have only 
>> been able to get the web site to appear by visibly placing the url on the 
>> form in a text and using a on click event as such:
>>
>> Private Sub Homepage_Click()
>>    WebBrowser2.Navigate (Homepage.Text)
>> End Sub
>>
>>> So what you want is the browser control to display the web page 
>>> associated with a record, without user intervention? If so, simply move 
>>> your code to the form's OnCurrent event. The OnCurrent event fires as 
>>> each fresh record becomes the "current" record, ie the one that is 
>>> currently shown.
>
> I tried as such with this code:
>
> Private Sub Form_Current()
>    WebBrowser2.Navigate (Homepage.Text)
> End Sub
>
> But receive the following error message:
>
> "You can't reference a property or method for a control unless the
> control has the focus."
>
> I would prefer  to not even have the URL showing on the form.
>
> Thanks, Steve

Ah, sorry. I missed that last time. The reason you're getting that error is 
because you're referring to the Homepage control's .Text property. Change it 
to either Homepage.Value or simply Homepage (because Value is the default 
property for controls, so you don't have to include it).

To make the URL hidden, set Homepage.Visible = False.


0
Stuart
2/16/2008 5:58:06 PM
Thanks, that's all it took, Steve.

>
> Ah, sorry. I missed that last time. The reason you're getting that error 
> is because you're referring to the Homepage control's .Text property. 
> Change it to either Homepage.Value or simply Homepage (because Value is 
> the default property for controls, so you don't have to include it).
>
> To make the URL hidden, set Homepage.Visible = False.
>
> 


0
Steve
2/16/2008 11:40:31 PM
Reply:

Similar Artilces:

Trying to update data in RMS with a web interface
My project is much more complicated, but I am hoping someone can give me some generic tips and/or code to assist me. I want to update a field in RMS with some data the cashier inputs on an HTML form. For example, if a cashier selects a customer using F7, I want them to press a custom button that brings up an HTML window. That html file will have a form where the cashier will enter some text in a textbox. When the cashier presses Submit, the text in the textbox will be written to the Customer.CustomText1 field. The two major issues are 1) how to pass the Customer.ID to the HTML window ...

Dual Displays
I want to connect my Sharp Aquos flat screen TV to my computer, and see my desktop on both the TV and computer monitor. Windows Vista Home Premium. HP Pavilion a1610n computer. Galaxy GeForce 8400 GS graphics card, outputs: 1-VGA, 1-DVI, and 1-SVGA. There is no HDMI port on the card. I connected a VGA cable between the motherboard "on-board" VGA port and the TV, figuring that I could use that output to work with the TV. The computer monitor is plugged into the GeForce graphics card. Tried the Desktop "Display Setting". It says, the number 2 monitor is "N...

Synching w/ the web
I upgraded from 2004 Standard to 2006 Standard on Friday. Since then, I have had nothing but problems. The problems I see include: 1. Taking literally forever for my accounts to synch up...I just get the 'update in progress' message for ever, even when I shut down the pc and restart. 2. If the updates are successful, I get two or three of every transaction, transaactions going back a year or more, mutual fund holdings that were long since disposed of. What I have found through hours and hours of playing around is that these problems only surface when I set up Money to synchr...

Display a message box "this entry is a duplicate"
How can I display a message box on a form if the shipment number is a duplicate? I need a message box to pop up when user attempts to tab out of the field. Thank you. Something like: Private Sub txtShipNum_BeforeUpdate(Cancel As Integer) If DCount("*", "MyTable", "ShipNum = '" & Me.txtShipNum & "'") > 0 Then Msgbox Me.txtShipNum & " already exists." Cancel = True End If End Sub This assumes that your text box is named txtShipNum, that the name of the field in table MyTable is ShipNum...

Folder could not be displayed
I am running Windows XP and Outlook Express 6 just fine then one day my husband does something to my computer and his email account won't work. My email is working just fine but in his he cannot open his inbox. It says folder could not be displayed, and when you send and receive it gives you this error message: "An unknown error has occured. Account: 'incoming.verizon.net'. Server:'incoming.verizon.net'.Protocol:POP3, port: 110, Secure(SSL): No, error number: 0x800C013B" If anyone could help me with this I would greatly appreciate it. Thank you T...

how to display values in 3 cells into one cell
Anyone can help me how do I display the 3 separate different values in 3 cells into just one single cell ? thanks so much in advance. Either there was a typo or there's an echo in here. That line should have been: = A1 & " " & B1 & " " & C1 "Bradley Dawson" <bradleydawson@earthlink.net> wrote in message news:l464b.2224$Lk5.2093@newsread3.news.pas.earthlink.net... > In the target cell, type: > > = A1 & B1 & C1 > > where A1, B1, C1 are the cell addresses that you want to concatenate. > > If these have number...

Dataset Merge / getchanges just adding records?
I'm using the following subroutine. The two different XML files are identical with the exception of three additional records in the second one. One has 450 records, and the other has 453. After merging, I get 903 records. I guess what I expected was 3 records; just the differences in the two. The two tables have the exact same structure, etc.... So am I misinterpreting how to do this? It seems to me that the merge should produce only three new records! Private Sub btnStart_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnStart.Click Dim dsOld As Data...

How to select & display distinct values
Hello, I need help with a form please. My form has two controls, the first being a combo box. This box should select the company name from a lookup table. The lookup table has only two companies in it, however, they each are repeated several time. Company 1 has about 10 rows, company 2 has 3 rows. I used the query builder and came up with the statement: "SELECT DISTINCT Lktbl_Role_Master.CompanyName FROM Lktbl_Role_Master;" When I run the statement directly from query view, it executes perfectly and returns exactly two rows (one for each company, in a datasheet view) ho...

Display Time in Outlook
The time setting in my Outlook is one hour behind my actual time. I cannot determine how to change the time. Outlook is the only item that is incorrect. Other display times in operating system are correct. Thanks, Jodi ...

Bank Reconciliation-Selected Record Has Been Deleted by Another Us
I have a user where she has been receiving the message "Selected Record Has Been Deleted by Another User" while she is in the bank renconciliation window. I have been able to reproduce the issue but only at this client. If she is in the window and is scrolling up and down and she happens to pause for about 5 seconds or more over one row but never clicks on it, as soon as she does click on it she gets the message. The only way to continue is to leave the screen and start the reconciliation process over again. I have a copy of their data on my server and I cannot get it to do th...

outlook web access 2003
web page downloads ok to my home 98SE based PC with 5.0 IE browser, but will not load ok with 6.0. The outlook web access program from work is on a 2000 Professional based server. thanks. all other webpages download ok but when i login to this remote email the page hangs up. try emptying the browser cache and if it's still a problem, repost in the owa newsgroup, http://communities2.microsoft.com/communities/newsgroups/en-us/default.aspx?dg=microsoft.public.exchange.clients -- Diane Poremsky [MVP - Outlook] Author, Teach Yourself Outlook 2003 in 24 Hours Coauthor, OneNote 2003 for W...

PK and FK Displayed
I am a complete Visio newbie, and cannot find the answer I need in books or online help. I am trying to create ER diagrams from scratch, and not connected to real tables, using VEA. I have added tables ('Entities') to the form, connected them with a Relationship connector, and, in the Database Properties window I've assigned the end points to a Primary Key on the left and a Foreign Key on the right. But the model shows the connector as running between the top colums on both sides, whereas I want the keys to be in that upper box and provide the connector's end points. Wh...

Microsoft Web Access E mail
This is a quirky problem that I hope someone can help me with. I am a remote home office in the NE and I work for a facility in NC. I receive and send my E mail through Microsoft Web Access Mail. So another words, I type www.xxxxxxx.net/outlook. I get a dialoge box, put in my username and password and up comes outlook. OK. The problem I have is that in the body where I type my e mail message I can not right click to do things like Copy and Paste. I click on the "right" mouse button and nothing happens at all. I simply can not right click. If I right click anywhere else on t...

Formulas are displayed, results are not
Hello, For some reason, when I enter a formula into a cell and press enter, the formula just stays there. Anyone know what I can do to show the results? I tried pressing Cntrl + `, but that didn't work. FYI, when I cut and paste a column from a separate workbook, that column works like normal (i.e., the formulas produce results). Thanks for any suggestions! Hi Mike, Maybe your cell is preformatted as Text. Try formatting to general then erase your = and type it in again. HTH Martin "Mike C" <js2k111@yahoo.com> wrote in message news:f699bcd4-ad82-4a88-9759-5638c147b...

Web Services install error
Hi everyone, I keep getting the following error when I try to install web services or econnect. Error Number = 25001 Error Description = [Microsoft][ODBC SQL Server Driver][SQL Server]Invalid column name 'VOIDED'. Error Source = eConnectInstall90.LoadProcs.AddSQLStoredProcedureLine Number = 240 I have the Web server and SQL Server on separate machine. Does anyone know what the problem is? When I try to install web services on the web server, i get this message. When i install econnect on the sql server, i also get this message. thanks, nick I finally figured it out. It ha...

Stop displaying a line
I have a line graph/chart and it gets its values using a formula and the values of another column. However this poses a problem because if there is nothing in the targetted column the formula returns 0 cause the line to drop to the bottom, instead of casuing the line to just end until a value is added to the target column. How can I do this? Change your formula to use NA() if the cell is empty. For example: =IF(A1="",NA(),A1) To hide the resulting #N/A errors on the worksheet, you can use conditional formatting. There are instructions here: http://www.contextures.com/xlC...

unattached textboxes disappear when a msgbox is displayed on a tab control
I'm using Access 2003. I have a form with a tab control on it. I was having problems with labels flashing and I followed the suggesting from Allen Browne - http://allenbrowne.com/ser-46.html. The flashing went away but now when a msgbox is displayed the unattached textboxes that I'm using as labels disappear. They come back as soon as the msgbox is removed from the screen. I've searched google looking for an answer but have come up short. Does anyone know why I'm experiencing this behavior and how to make it go away? Thanks, Rick That *is* strange. Have you tr...

A question about Console window(display or not display)
I've redirected the (stdin stdout stderr) of a console window process I spawned to a pipe. And I want to display the redirected console window, the question is: If I display it(set Create_new_CONSOLE in createprocess and some flags in startupinfo), I cannot use the redirected way of pipe, which means if i do not display, i can use the pipe communicating with the child process. Does it mean that as long as I disply the console window, windows will change stdin stdout to "screen&keyboard" instead of my pipe? That's right. If you redirect stdin or stdout then you preemp...

Display or not display series
I have a graph with four series but some of the series may be blank, i.e. the series name is <blank series>. Is there a way to not display these series on the graph and/or legend if they are blank, and display them if they are without deleting the series? Thanks! Clay Create a chart from all the data Select the data on which the chart is based. Choose Data>Filter>AutoFilter In the heading cell for the series name column, select (NonBlanks) from the dropdown list The series with blank name cells will be hidden in the chart. Clay wrote: > I have a graph with four serie...

does Excel support multiple display monitors?
Hello All Excel Experts How do I move chart windows to multiple display montors?? (one computer runnng three monitors... Excel Charts will not move off the primary monitor. Your advice is EXTREMELY appreciated thanks. Denni ...

Displaying an equation
I have an equation setup that is referencing a few other cells that have equations in them. I want to have a cell that displays this equation with the answers that are calculated from these other cells displayed as values in the new equation. Any help would be greatly appreciated. Thanks Check out http://www.mvps.org/dmcritchie/excel/formula.htm#getformula In article <E4143E2B-360A-4B43-955F-73BF8EC60694@microsoft.com>, "hoising8" <hoising8@discussions.microsoft.com> wrote: > I have an equation setup that is referencing a few other cells that have > eq...

records before 6 months
Hello everyone, Anyone know how to select records before 6 months? Basically I have a date field and I need to select records older than 6 months from the current date. So today is 03/29/10. I would need all the records BEFORE 10/29/09. Let me know what you guys think. Thanks, Himansu On Mar 29, 2:24=A0pm, "Himansu" <himansu...@hotmail.com> wrote: > Hello everyone, > > Anyone know how to select records before 6 months? > Basically I have a date field and I need to select records > older than 6 months from the current date. =A0So today is...

Serialisation
A general query Im serialising a person object with the following member variables Class Person Private _forenames As String Private _surname As String Private _dob As Date Private _marital_status As MaritalStatus 'Public Get and Set Properties here for each of the above ' I'll not detail them all to save space but Ill show attributes <XmlElementAttribute(Elementname:="forename")> _ <XmlElementAttribute(Elementname:="surname")> _ <XmlElementAttribute(Elementname:="dob"...

New Email does not display
When new email arrives you don't know it. You don't know you have new mail until you click on an existing email in your inbox. Any ideas? It's a setting. But... 1. You don't tell us the program you're using. 2. We can't guess if it's Outlook or Outlook Express. 3. This is the Excel newsgroup; you're in the wrong place. :) ******************* ~Anne Troy www.OfficeArticles.com "Travis" <Travis@discussions.microsoft.com> wrote in message news:D864BC01-7D98-48DA-A132-614D02E45963@microsoft.com... > When new email arrives you don't know ...

Display 4 weeks of data
Hello all, I am trying to create a query in which data is displayed for the current month beginning with the first day of the week, first week of the month and ending with the last day of the week, last week of the month. In example: Today is Friday June 1, 2007 but the first day of the week would be Sunday, May 27, 2007. I would like the query to show data between 5/27/2007 through 6/30/2007 -OR- 4/29/2007 through 6/2/2007 for the previous month... Does anyone have any ideas? First day of the current month is DateSerial(Year(Date()), Month(Date()), 1) Last day of the current month...