Page 1 Page 2



First Published 30 Nov 2023

Here is a simple puzzle designed to entertain you and make you think!

The puzzle was set by one of my regular readers, Xavier (Xevi) Batlle, who contacted me recently with some minor modifications he had made to the continuous form used in my Highlight Current Record example app.

In the original form, there is a hidden textbox control coloured in red which is used to manage the highlighting in the continuous form. The control is also enabled and unlocked.

Design View

DesignView
Form View

Continuous Form

Xevi had made a few changes to the textbox which was now coloured green, made visible, locked and disabled. He had also duplicated the control!
Apparently these changes were done whilst he was investigating comments made by fellow MVP, Karl Donaubauer on LinkedIn in response to my earlier article!

Modified Form
The current record is still highlighted as in the original form.

Like any textbox controls which are both disabled and locked, the locked property takes priority for the appearance so it does not appear 'greyed out'.
See my article: Greyed Out Controls : Disable or Lock?

In addition, controls which are both disabled and locked cannot be 'activated'. They do not allow the mouse cursor to be placed anywhere in the control

This applies to the left textbox but, as shown above, the right textbox CAN be activated with the mouse placed anywhere in the control and the control text selected.

So Xevi's puzzle is very simple. What makes the controls behave differently and why does it happen?
It should only take a few minutes to solve this puzzle and I hope you will be able to see a practical use for this approach as well.

I will provide the answer to this puzzle in the second part of this article to be published tomorrow.
However, I hope some of you will work out the answer before then!

Feel free to contact me with your solution by clicking the E-Mail button on the feedback form below.



Download

Click to download the example app:   SetCursor.accdb     Approx 0.5 MB (zipped)

Download and unblockthe zip file.
For more details, see my article: Unblock downloaded files by removing the Mark of the Web

Unzip and save the ACCDB file to a trusted location.



Feedback

Please use the contact form below to let me know whether you found this article interesting/useful or if you have any questions/comments.

Please also consider making a donation towards the costs of maintaining this website. Thank you



Colin Riddington           Mendip Data Systems                 Last Updated 30 Nov 2023



Return to Access Blog Page




Return to Top