Hi I'm trying to use a stored function to update a twitter account from my db.
Here is the stored function;
Public Function Twitter_Live(Listing As Integer, JOBNUM, JOBSTREET, JOBOFFICE)
Dim Twitter, xml, tUsername, tPassword, tStatus, tResult
Set xml = CreateObject("MSXML2.XMLHTTP")
'get the username entered by you in named range tusername
tUsername = "xxxxxx"
'get the password entered by you in named range tpasswd
tPassword = "xxxxxx"
'get the message entered by you in named range tmessage
tStatus = "just photographed " & JOBNUM & " " & JOBSTREET & " for " & JOBOFFICE & ". "
tStatus = tStatus & http://www.xyv.com/ & Listing
xml.Open "POST", "http://" & tUsername & ":" & tPassword & "@twitter.com/statuses/update.xml?status=" & tStatus, False
xml.setRequestHeader "Content-Type", "content=text/html; charset=iso-8859-1"
xml.Send
tResult = xml.responsetext 'you can view Twitter’s response in debug window
Debug.Print tResult
Set xml = Nothing
End Function
and here is the code from the form;
Private Sub BtnLive_Click()
Me.JobStatus = "L"
Me.JobLiveDate = Now()
Me.Requery
Twitter_Live(Me.JOBID, Me.JOBNUM, Me.JOBSTREET, Me.OfficeDisplayName)
End Sub
I get and error where it is expecting an '='
I'm not sure why.
Any help much appreciated.
Cheers
Nathan