I have a relatively simple Continuous Form. There is an invisible Check Box, let’s call it Frank.
There is second Check Box (Ralph) which may be True or False. There’s also a text box with a date (RalphDate).
If Frank is True, I don’t want the user to be able to change Ralph or RalphDate, regardless of what is already there.
Now, RalphDate is easy in that I just use a Conditional Format to check the value of Frank which either enables or disables RalphDate. This option is not available for a Check Box.
I’m now stuck, because using some Visual Basic sets the state of all the Ralph boxes the same based on the value of the first Frank value it comes across. The question therefore, is how do I disable only the associated Ralph Check Box based on the Frank Check Box being True?
Solution 1
Lockedproperty instead ofEnabledfor ckRalph.The Locked property will prevent changes without visual cue. This should take care of the functional part, even though visually the checkbox will still look enabled, it can’t be changed.
Solution 2
Another way is to simulate the checkbox by doing this:
=getstate()‘create a
getstatefunction that does something like:I suggest using a symbol font and a character to make the tick appear better in its box.
So now, if your Ralph is true, the checkbox will display the tick and if not, it will be empty.
To complete the trick, use conditional formatting on the textbox to disabled it when Franck is true.
To make the clicking more realistic, also change the cursor to the hand pointer.
The last things that’s needed is to wire the the OnClick event from our
fakeckRalphtextbox so that we can toggle the state of Ralph and display it properly:I’ve user similar techniques to show whether a record on a continuous form was locked (used a blue colour padlock symbol from one of the Windings fonts) or deletable, with a big red cross that could be clicked:
image 2 http://img9.imageshack.us/img9/6296/sshot2do5.png image 1 http://img8.imageshack.us/img8/4997/sshot1ya5.png