Pass data to website

G

Guest

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.
 
G

Guest

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
 
G

Guest

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 said:
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 said:
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.
 
G

Guest

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 said:
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 said:
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 said:
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.
 
G

Guest

Hi Kathy

Me again!

I've just noticed that your GET string looks strange.

The format is usually:
URL?variable1=value1&variable2=value2&variable3=value3 etc.

However, you seem to have a value as a variable at ...:

"&" & TblDemo.fname & "=" & [strFirstName]

This reads like ... value=value which doesn't make sense?

Something like ...:
"&fname=" & [strFirstName] would make sense. Obviously fname, lname etc.
have to tie in with the 'request' commands in your php page.

We'll get there in the end!

BW
Kathy said:
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 said:
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 said:
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.
 
G

Guest

Thanks so much for sticking with this issue.

You are right, about my string. I have been testing it with the correct
syntex though. For now I have dropped all additional fields until I get one
to work so I have just been using the last name field.

I have tried your suggestion for the Follow Hyperlink method and I end up
with the same result.

I have also changed the event to run on the registration form where the form
object is active in case that made a difference. But it continues to
populate the data that is typed rather than finding the data in the table or
form.

....php? lname = Forms!FrmDemo.strLastName and Forms!FrmDemo.strlLastName is
displaying in the php page in the lname placeholder as well in the browser
address bar.

do i have to open a connection or "call" the data into the script some how
before I can send the data to the web?



BeWyched said:
Hi Kathy

Me again!

I've just noticed that your GET string looks strange.

The format is usually:
URL?variable1=value1&variable2=value2&variable3=value3 etc.

However, you seem to have a value as a variable at ...:

"&" & TblDemo.fname & "=" & [strFirstName]

This reads like ... value=value which doesn't make sense?

Something like ...:
"&fname=" & [strFirstName] would make sense. Obviously fname, lname etc.
have to tie in with the 'request' commands in your php page.

We'll get there in the end!

BW
Kathy said:
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 said:
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
:

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.
 
G

Guest

Hi Kathy

I'm not sure I understand from your post how you are
inputting/preparing/presenting the data to be captured for the string.

If you would like to e-mail the application I'll be happy to get it sorted
for you - send to (e-mail address removed)

Note that its nearly midnight here (in the UK) so I won't respond until
tomorrow (have to get some sleep some time)!!

BW
 
G

Guest

Good Afternoon?..BeWyched

Thank you for your perseverance and offer to work on my issue. I was
preparing to send you the database and decided to give it one more try. Low
and behold I got if figured out!

Code is obviously not my strong suit!

Thanks again, it is greatly appreciated.


BeWyched said:
Hi Kathy

I'm not sure I understand from your post how you are
inputting/preparing/presenting the data to be captured for the string.

If you would like to e-mail the application I'll be happy to get it sorted
for you - send to (e-mail address removed)

Note that its nearly midnight here (in the UK) so I won't respond until
tomorrow (have to get some sleep some time)!!

BW

Kathy said:
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.
 

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