I have two date/time fields in a form. In both the existing event I have written code which checks for weekend date and displays msgbox. Let me name them date1 and date2. So if I’m in date1 and select weekend as my date. If I click on the date2 field I get msgbox but calendar opens for date2. How to restrict the calendar to pop-up since then the purpose of writing code in existing event does not satisfy.
Hope you have understood what I am trying to say. On the date/time field there’s calendar icon and on clicking that this happens.
I tried it but got error for the $$Hidedate1flag. Is there any other way without having too many fields, since I mentioned only 2 dates in my previous mail, in reality I have 5 date/time fields and imagine having too many flag fields and then double the date/time field.
Also realize that the flag fields REDUCE the number of calculations on the page. You have 2 hide/whens using the flag, but only need to do the evaluation once. This is good. Also these are Computed For Display fields, so they are really just containers for your logic, not data in your document, per se.
What error did you get?
I do this kind of relationship all the time. Its nice, because all the (normally buried) hide logic is right together at the top of the page in hidden fields. Also its easy to understand:
Whenever your HideFlag is ‘True’ then it’s hidden.
Thanks Brian. Instead of using hidden fields I wrote a formula in Input Validation which doesn’t allow user to go to another field if not correct. And if this doesnt work I have written in save event too, there by documents don’t get saved if date is weekend.