Talking to a web page

  • Thread starter Thread starter Keith
  • Start date Start date
K

Keith

Hello geniuses,

I'm trying to send info to a website ... all I need to do is send this,
http://www.website.com/webpage.asp?Company=123&Client=456
I am able to do this from a command button, using a hyperlink like this
cmdButton.hyperlink=http://www.website.com/webpage.asp?Company=123&Client=456
However this calls the browser, which I dont want to do.

Is there a good way to do this directly from access, without envolving the
browser. Preferably that access can behave as a browser for other stuff too.
I also tried a Microsoft example that said, "add a winsock active-X control
to a form", but could not get this right either.

Thanks in advance,
Keith
 
Hey Keith, have I got the code for you ...

I wrote an article about this for DBJ
http://www.databasejournal.com/features/msaccess/article.php/3491216


Basically, set a referenct to the SHDocVw.InternetExplorer library and then
call a function something like this ...

Public UpdateOrderInfoWebSite() As Long
On Error Resume Next

Dim objDoc As SHDocVw.InternetExplorer
Dim sURL As String
Dim lOrderID As Long

lOrderID = Forms!frmOrder!txtOrderID

Const cURL As String = "http://localhost/Orders/Process.asp"

sURL = cURL & "?ID=" & lOrderID
sURL = sURL & "&SDate = " & Forms!frmOrder!txtStatusDate
sURL = sURL & "&SID = " & Forms!frmOrder!cboStatusID
sURL = sURL & "&PONum = " & Forms!frmOrder!txtPONumber
sURL = sURL & "&CID = " & Forms!frmOrder!cboCustomerID

Set objDoc = New SHDocVw.InternetExplorer
objDoc.Navigate sURL, , , True

' Need something to pause execution while URL is hit.
Dim i As Integer, j As Integer
For i = 0 To 1000
j = DCount("*", "MsysObjects")
Next

UpdateOrderInfoWebSite = Err.Number

End Function


Now, for those of you who despise IE (read, David Fenton here), you can do
the same thing with a Web Service and maintain a little more security.
http://www.databasejournal.com/features/msaccess/article.php/3567511


Danny J. Lesandrini
(e-mail address removed)
http://amazecreations.com/datafast/
 

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

Back
Top