Avatar of SteveL13
SteveL13
Flag for United States of America asked on

Message box when user clicks on any of several fields on a form

I have several fields on a form that display information only.  They are not meant to have data entered or edited.  The fields are all locked and tab stop = No.

In each of the fields I have the tag property set to "Viewable" (without the quote marks.

But if the user clicks on any of the fields I want a msgbox to appear that says "Viewable information only"

Is there a way to make this happen in the oncurrent event of the form?  Or ?  Or do I have to put the msgbox code in each fields on click event?  There are several.
Microsoft Access

Avatar of undefined
Last Comment
Rey Obrero (Capricorn1)

8/22/2022 - Mon
Shaun Kline

Instead of displaying a message box, it may be a better approach to use a visual clue that the field is locked, such as changing the text color or the background color. By displaying the message box, an inadvertent click in one of the fields will cause the message box to display and what seems to be a benign alert can quickly become an large annoyance.

Also, if for some reason your user wanted to highlight text in the locked control (textbox) to copy/paste the text elsewhere, this message box again would be an annoyance.
SteveL13

ASKER
I very much do appreciate your insight.  But in this case we really do want a message box to appear.  Can it be done without having to write the code behind each field's onclick event?
SOLUTION
Shaun Kline

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
ASKER CERTIFIED SOLUTION
Rey Obrero (Capricorn1)

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
⚡ FREE TRIAL OFFER
Try out a week of full access for free.
Find out why thousands trust the EE community with their toughest problems.
This is the best money I have ever spent. I cannot not tell you how many times these folks have saved my bacon. I learn so much from the contributors.
rwheeler23