send a value to open web site

A

a

dear friends
can i send value to text box to open web site with out using access 2003
object browser control
Me.broWebpage.Document.all.textname.value= "1"
I want to replace browebpage control with the name of the open site
is this possible
 
D

Danny J. Lesandrini

If the web page address is saved somewhere, either hard coded in VBA or available
as the value in a table field, then use Application.FollowHyperlink strWebAddress
where strWebAddress is populated with the target address
 
A

a

please give me example to see
did you mean :
application.followhyperlink strwebaddress.Document.all.textname.value= "1"
like this
or what do you mean
 
D

Danny J. Lesandrini

Ok, I completely missed the point. First, what sort of programmer are you?
Word automation developer? Web developer?

I ask because I have never seen this syntax ...
strwebaddress.Document.all.textname.value= "1"

What I was suggesting, in it's simplest form, is this ...

Application.FollowHyperLink "www.msnbc.com"

A more complex, and useful approach, is to use a variable that is updated
based on the context, like a site connected to a particular contact.

Dim strLink As String

strLink = Me!txtWebSite
Application.FollowHyperlink strLink

I don't know what the .Document.All.TextName.Value = "1" is all about.
There really isn't anything in Access that corresponds to that.
 
A

a

i'm not programmer

my question is
as in the subject of the message
send a value to open Web Site
example
if google site is open
how can i send "vb.net 2020" and search it in google by using access command
button
this i mean
google is example
 
D

Danny J. Lesandrini

Ok, that's what I thought.

This is the deal. You probably can't populate the text box on a web page from Access.
(Someone may know how, but odds are it will take more code than you will want to have
to deal with.

Alternatively, if the page exposes querystring arguments, as the Google pages do, your
URL that is passed to the FollowHyperlink command can pass the needed parameters.

Below is a link to a google search on the word "yadda". Notice the querystring args.

http://www.google.com/hws/search?q=yadda&hl=en&client=dell-usuk&channel=us-smb

To create an Access form to search google for a word (or words) I would write the
following VBA code behind a form with a text box and command button. In fact, I did
do this code and it does work.

Private Sub cmdGoogleIt_Click()
On Error Resume Next

Dim strURL As String
Dim strParam As String
Dim strQuery As String

strURL = "http://www.google.com/hws/search?q="
strParam = Me!txtSearchText
strQuery = "&hl=en&client=dell-usuk&channel=us-smb"

strURL = strURL & strParam & strQuery
Application.FollowHyperlink strURL

End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top