RE: Pass data to website
- From: BeWyched <BeWyched@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Mon, 6 Nov 2006 10:47:02 -0800
Hi Kathy
A couple of points:
1. Have you though of using the 'FollowHyperlink' method? It seems to be
more stable than the approach you've taken..
The syntax is:
Application.FollowHyperlink
"http://www.website.ca/hsregister.php?variable1=value1&variable2=value2&etc."
2. If the web page isn't displaying the correct values then its likely that
the string after the '?' isn't correct. Try debugging - e.g. add the line:
msgbox "?lname=" & TblDemo.[strLastName] & "&" & TblDemo.fname & "=" &
[strFirstName] "&email=" & TblDemo.[strEmail]" & "&prodid=XX&version=XX"
and see what it looks like. If it looks OK try pasting it straight into your
web browser and see if you get the correct response. If not, then re-work the
string.
BW
"Kathy" wrote:
Thanks for the response. Unfortunately I am getting a compile error..
I copied your code into the vb editor and get the following:
Expected: Line number or label or statement or end of statement.
If I add a quotation at the beginning of the url, i get a syntex error.
If I and modify the code ie. remove spaces, put all on one line, remove or
add quotations, the best results I have gotten is the field name being
displayed in the web form such as TblDemo.strLastName. Not the actual data
from the table.
I have also received an Object required error so i changed the filed name to
Tables!TblDemo.strLastName but that still does not work.
Any more suggestions?
"BeWyched" wrote:
Looks like you haven't built the HTTP Get string correctly. Try:
stAppName = "C:\Program Files\Internet Explorer\IEXPLORE.EXE
http://www.website.ca/hsregister.php?lname=" & TblDemo.[strLastName] & "&" &
TblDemo.fname & "=" & [strFirstName] &"&email=" & TblDemo.[strEmail]" &
"&prodid=XX&version=XX"
Call Shell(stAppName, 1)
Good luck
BW
"Kathy" wrote:
I need to send information from a database to a website. I am using "Run
App" to call IE, but I can't seem to get the data to show up from the table
into the php page.
This is what I have done so far:
Private Sub Command19_Click()
On Error GoTo Err_Command19_Click
Dim stAppName As String
stAppName = "C:\Program Files\Internet Explorer\IEXPLORE.EXE
http://www.website.ca/hsregister.php?""lname=TblDemo.[strLastName]&TblDemo.fname=[strFirstName]&email=TblDemo.[strEmail]&prodid=XX&version=XX"
Call Shell(stAppName, 1)
Exit_Command19_Click:
Exit Sub
Err_Command19_Click:
MsgBox Err.Description
Resume Exit_Command19_Click
If anyone knows what is missing i would greatly appreciate the help.
- Prev by Date: Public Function causes Access to crash??
- Next by Date: Re: Public Function causes Access to crash??
- Previous by thread: Public Function causes Access to crash??
- Next by thread: RE: Pass data to website
- Index(es):
Relevant Pages
|