Hy.
I have this database with couple of forms. Now I would like to add some nice functions to it.
First, we have Click-2-Call system in our office. So I would like to program button to push this code to our servers:
Set objHTTP = CreateObject("MSXML2.ServerXMLHTTP")
URL = "http://192.168.2.37:9191/?user=pothos&From=#######&To=########"
objHTTP.Open "POST", URL, False
objHTTP.setRequestHeader "User-Agent", "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0)"
objHTTP.send ("")
Code is fine and it works. Only problem is that it only works if I manually change both - value for From=####### AND value for To=######## in to numbers I would like to dial (FROM is my phone and TO is phone number I wish to call).
And now I would like it to change automatically with every record in form.
change FROM
I use log in form where user chooses which work station is he/she working on. And then this value is saved as TempVariable. So for this to work I think I should write Dlookup function to look up which phone corresponds to work station ID that is stored in TempVariable. And then referenced it in upper code after From=
But I don't know how to do that? Any help appreciated !
change TO
Phone number for customer I wish to call is in SAME subform as button which calls for this code (if that is perhaps important). Structure goes like this:
Main Form - FORM1
Tab - TAB1 (Many tabs because it's tabbed main form. If that is somehow important for referencing)
Subform - SUBFORM1
Field - FIELD1 (where number I wish to put instead of ###### is stored)
Button - BUTTON1 (in same subform as FIELD1 and I wish to put this code in OnClick event)
I tried with Me.FIELD1 and Me!FIELD1 and many other try and error options ! And all were error. So, please, can you help me?