I have a parameter query that looks up the tracking # for a given customer_order_ID and outputs the tracking# as a website link, as a single record. Please advise me how I can have the link run automatically when the user inputs the customer_order_ID into the parameter query , in order that the user can immediately track the package on the UPS Worldship website. I do not know VBA nor do I know SQL, but I can make macros.
Thank you very much in advance
SELECT T.order_ID, "http://wwwapps.ups.com/WebTracking/processInputRequest?sort_by=status&tracknums_displayed=1&TypeOfInquiryNumber=T&loc=en_us&InquiryNumber1=" & [T].[tracking_number] & "&track.x=0&track.y=0" AS link
FROM tblShipmentDataFromAllCarriers AS T
WHERE (((T.order_ID)=[Please enter customer order ID]));
If you don’t need to parse the return data and just want to open the web page, you can use Application.FollowHyperlink. But you don’t need to do the concatenation with the URL in the SQL:
Then you could store the rest of the URL as constants:
…and then execute it like this:
You’d then have to have a UI to collect the OrderID from the user (I’d suggest a form with a combo box) and then call this sub.