Solved Another is this possible question - hiding/disabling a label of the current record of a continuous form (1 Viewer)

Sam Summers

Registered User.
Local time
Today, 05:57
Joined
Sep 17, 2001
Messages
939
I have searched and searched and tried all kinds of tricks but no luck at all yet.

My problem is that i have to use a Label which is the only way i can send a message via a hyperlink to a Whatsapp recipient when the user clicks on the Label.

This is the only way that i can communicate easily with Whatsapp.

The trouble is that if the user clicks on this label in another record other than the one indicated or currently selected at the record selector then the message is sent to that records recipient rather than the record where the label has been clicked on.

So i have been trying to disable or hide all the forms labels apart from the current selected records one.

Any ideas?

Thank you in advance but this one may not have a solution..........
 

arnelgp

..forever waiting... waiting for jellybean!
Local time
Today, 12:57
Joined
May 7, 2009
Messages
19,231
why don't you filter your form to only show 1 record.
 

Minty

AWF VIP
Local time
Today, 05:57
Joined
Jul 26, 2013
Messages
10,366
Conditional formatting is the answer - you can enable and disable a control based on it.
However - I'm not sure you can use CF on a label.

The other option would be to change your label to a text box, I can't see what a label could achieve that a text box wouldn't be able to?
 

Sam Summers

Registered User.
Local time
Today, 05:57
Joined
Sep 17, 2001
Messages
939
Conditional formatting is the answer - you can enable and disable a control based on it.
However - I'm not sure you can use CF on a label.

The other option would be to change your label to a text box, I can't see what a label could achieve that a text box wouldn't be able to?
I have tried all kinds of tricks but you are right about CF not working on a Label.

It a strange one but the particular string to send a message quickly and simply only works from a Label which is quite annoying
 

arnelgp

..forever waiting... waiting for jellybean!
Local time
Today, 12:57
Joined
May 7, 2009
Messages
19,231
Hi Arnel, not sure how that would work as the user may not want to select that particular record?
then move the label out of the continuous form?

on current event of your continuous form, rebuild the string link.
 

Sam Summers

Registered User.
Local time
Today, 05:57
Joined
Sep 17, 2001
Messages
939
Even if i could somehow shield it with a textbox which i could then send to the back?
 

arnelgp

..forever waiting... waiting for jellybean!
Local time
Today, 12:57
Joined
May 7, 2009
Messages
19,231
build the link on the Current event of the form.
so the label only refers to the Currently selected.
 

Sam Summers

Registered User.
Local time
Today, 05:57
Joined
Sep 17, 2001
Messages
939
Ok guys, after all kinds of tricks and other methods this will remain unsolved as there is no way to work with a label to achieve the functionality that i require (Every record in the continuous form has its own unique Hyperlink string depending on the person associated with that record).
 

Minty

AWF VIP
Local time
Today, 05:57
Joined
Jul 26, 2013
Messages
10,366
I think you are overthinking this, and I can't believe you can't get the same functionality out of a normal text box or command button.

If they click on another label in another record, that record becomes the current one, so anything that would be switching the label in and out in and out would be triggered and allow them to click on it anyway (I think).

I'm with @arnelgp - Move the link/command button to the form header and "do your thing" there.
That will require the end-user to see what record they are on. Maybe force it to be a double click, then it's unlikely to happen by accident.
 

theDBguy

I’m here to help
Staff member
Local time
Yesterday, 21:57
Joined
Oct 29, 2018
Messages
21,454
The trouble is that if the user clicks on this label in another record other than the one indicated or currently selected at the record selector then the message is sent to that records recipient rather than the record where the label has been clicked on.
I am not sure that labels could take focus; so as already mentioned, I would suggest replacing it with a transparent command button.
 

Sam Summers

Registered User.
Local time
Today, 05:57
Joined
Sep 17, 2001
Messages
939
I have tried all kinds of ways with this.

The labels are over the two check boxes as in the screenshot attached.

I have tried creating the functionality in other controls but for some reason after much research WhatsApp only works in the way i need it to send messages from a Label which is strange indeed.

The label hyperlink code that finally worked after much messing about is this:

="https://wa.me/" & [PhoneNo] &"?text=Your%20Order " & [PONumber] & "%20is%20in%20transit%20on%20the%20boat%20from%20Dornie"

and only exactly this whole string.

I don't know any other way of achieving this?
 

Attachments

  • Screenshot 2021-06-24 175328.png
    Screenshot 2021-06-24 175328.png
    18.9 KB · Views: 268

Minty

AWF VIP
Local time
Today, 05:57
Joined
Jul 26, 2013
Messages
10,366
What is the whole code of the label click, and where is it getting [PhoneNo] from?
 

arnelgp

..forever waiting... waiting for jellybean!
Local time
Today, 12:57
Joined
May 7, 2009
Messages
19,231
maybe something similar.
 

Attachments

  • TextMe.accdb
    544 KB · Views: 300

Sam Summers

Registered User.
Local time
Today, 05:57
Joined
Sep 17, 2001
Messages
939
What is the whole code of the label click, and where is it getting [PhoneNo] from?
The full code is this:

="https://wa.me/" & [PhoneNo] &"?text=Your%20Order " & [PONumber] & "%20is%20in%20transit%20on%20the%20boat%20from%20Dornie"

In full, including the =

The [PhoneNo] and [PONumber] portions are fields on the form.

The above hyperlink string is inserted into the 'Hyperlink Address' section in the format of the Label
 

Minty

AWF VIP
Local time
Today, 05:57
Joined
Jul 26, 2013
Messages
10,366
So did you see @arnelgp demo?

You should be able to replicate the label action by simply using VBA code something like;

Code:
Application.Followhyperlink "=https://wa.me/1111111?text=Your%20Order ABC12345%20is%20in%20transit%20on%20the%20boat%20from%20Dornie"

Assuming your Phone number and PO number controls are called the same as the field names?
 
Last edited:

Users who are viewing this thread

Top Bottom