Creating A Hyperlink When Editing A Query (1 Viewer)

Diamond-Leopard

Registered User.
Local time
Today, 19:05
Joined
Oct 30, 2018
Messages
26
So I sell things online and send them to all my customers. So when an order is placed I have set up a form to collect all the sales information. A few days later I get an email with the Tracking Code from Hermes or DPD or whichever courier I use.

When this information comes in I have created a Form with a Button Called "Add Tracking Information" and I have this button running a query for all existing orders which don't currently have Tracking Codes.

I am then able to add the tracking code into the design view Tracking Query which amends the order record and that's all gravy.

About 4 days Later I would like to go back into run a query with all orders which are not yet delievered and I know how to do that... but what I would like is a link I can click to take me to "parcelsapp.com/en/tracking/(INSERT TRACKING CODE HERE)" and that link will show me if the parcel has been delievered and I can update the order status.

So basically here is what I want...

When I type in a reference code into the 'Tracking Reference Code' Field I would like the 'Tracking Link' Field to auto populate with the correct hyperlink so I can click it in a couple days and Check the status.

In excell it is this >>

If('Tracking Reference Code Cell' ="","",Concatenate("parcelsapp.com/en/tracking/,'Tracking[/url] Code Cell')

So if the cell is empty then it does nothing... however if there is a tracking code it pops the code at the end of the link to create a clickable hyperlink to a page which shows me the delievery status.

I have done many hours of looking and I have found something like

IFF "Tracking_Reference_Code" is not null then "Tracking Link" = "parcelsapp.com/en/tracking/" & "Tracking_Reference_Code"

That is a pure guess based on all the pages I've been on to look for this.. but to be honest even if this code is correct I am not entirely sure where to put it ... I only want the record to be edited when I run the "Add Tracking" query and it shows me all the records not currently being tracked and then only when I paste the Tracking Reference Code ( Something like RY0845845CN) into the correct field, which then autopopulates another field to be a clickable link.

Phew... That was a long explanation.... Thank you if you read that far and thank you even more if you have the answer. I'm sure it's something simple but I am such an Access virgin I am really struggling lol

Anywho... Thanks in advance. x
 

isladogs

MVP / VIP
Local time
Today, 19:05
Joined
Jan 14, 2017
Messages
18,186
Try adding this as a new query column
Code:
Tracking_Link:IIf(Nz("Tracking_Reference_Code","")<>"","parcelsapp.com/en/tracking/" & "Tracking_Reference_Code","")
 

theDBguy

I’m here to help
Staff member
Local time
Today, 12:05
Joined
Oct 29, 2018
Messages
21,358
Hi,

You could also try it this way.

Tracking_Link: "https://www.parcelsapp.com/en/tracking/" + Tracking_Reference_Code

However, if you are viewing this in a query, I am not sure if it will be clickable. If not, you might have to view it in a form.
 

Pat Hartman

Super Moderator
Staff member
Local time
Today, 15:05
Joined
Feb 19, 2002
Messages
42,971
You need to use a form. Queries do not have events. In the double- click event of the control that holds the path, use the FollowHyperlink method (intellisense will help you build it).
 

Users who are viewing this thread

Top Bottom