RE: Pass data to website

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



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.


.



Relevant Pages

  • RE: Pass data to website
    ... I've just noticed that your GET string looks strange. ... "Kathy" wrote: ... If I add a quotation at the beginning of the url, ... Dim stAppName As String ...
    (microsoft.public.access.modulesdaovba)
  • Re: Opening a Word doc using a command button on a form.
    ... On the form right click the control and select Properties. ... Private Sub btnOpenRequest_Click ... Dim stAppName As String ... 'Previous stAppName lines are all on one line ...
    (microsoft.public.access.formscoding)
  • Re: Does a textbox have to have a name reference, or can I use a w
    ... I did notice that the placement of commas in the "London" part of the string ... attempting to set the value of stAppName? ... Private Sub btn_Google_it_Click ...
    (microsoft.public.access.formscoding)
  • Re: Merge Problem - Middle Name Field printing with extra space
    ... I set up the merge document and use the following merge string for Middle ... John Smith ... Kathy B ...
    (microsoft.public.word.docmanagement)
  • Re: Toward Terser Java
    ... {addToken(new StringLiteralToken(quotation));} ... public class QuotationAccumulator extends BaseAccumulator { ... public class CommentAccumulator extends BaseAccumulator { ... String quotation = accumulatedQuotation.toFinalString; ...
    (comp.lang.java.programmer)