Optional visible control on continuous form

nschroeder

nschroeder
Local time
Today, 10:56
Joined
Jan 8, 2007
Messages
186
I have a form that shows assigned tasks, with a due date (locked) and a completed date that the user enters on completion. I'm trying to add a 2nd optional due date/completion date for certain tasks that have dual roles. I only want the 2nd dates to be visible if the 2nd due date contains a value. I can handle that with conditional formatting on the due date, but how do I make the completion date control visible or not based on the value of the due date? It's in a continuous form, so I can't do it in the Current event, because that would make it visible on all records, not just the current one.

I'm sure this is an old question, but I wasn't sure how to word the search criteria to find an answer.
 
Sorry, but you can't do it on a continuous form. The reason being, is that the control is actually ONE control but it is made to LOOK like it is multiples. So, anything you do to that one is going to be reflected in the others.
 
you may be able to fiddle this, but it may not look nice. create the control for the second due date but it can not have borders or any specialeffect (eg sunken) . In the conditional format use an expression that identifies a second due date is NOT required and set the background & font colours to that of the form/background and enabled to no (making it 'appear' invizible and unable to be selected on the form).

What criteria would determine if a second due date was required?
 
The 2nd DUE date will be given a value (or not) when the task is assigned by the system. I already have it set up as you suggested, with no borders and a background matching the form, so it only appears if it has a value. It's the 2nd COMPLETED date that I need the visibility optional, so they can mark when the task is done. If I set up the format the same way as the due date, they won't know it's there.

If microsoft had a conditional formatting based on another control's value instead of its own, this would be easy.

I'll keep playing and see what I can come up with. I don't give up easily!
 
If microsoft had a conditional formatting based on another control's value instead of its own, this would be easy.
You can use another control value with Conditional Formatting. You change the FIELD IS to EXPRESSION IS.
 
And you said it couldn't be done! ;) Thanks. That gave me what I needed.

I also set it up to look like the other controls by adding a "border" control. It is a textbox directly under the completion date textbox. It has a transparent border and a forecolor the same as the window, so it also is normally invisible, but conditional formatting gives it a darker forecolor when needed. I fiddled with the forecolor, top, left, height, and width properties until it was slightly bigger than the completion date all the way around, making it appear like a border on the completion date. It took some time to get it positioned perfectly, but the combination makes the 2nd completion date look exactly like the other controls on the form.

End result is exactly what I was looking for. Thanks again!
 
Maybe this solution would be overkill for what you are trying to do but,
you could have a "complete" button on each record that when the user clicks it a window pops up that allows them to enter a completion date. AT that point you can determine if it's a dual date task or not and plug the completion date into the appropriate column. Then, in your query behind the form have an expression field that is =iif(completiondate2<>"",completiondate2,""). So the user wouldn't be able to type anything in the complete column on the form but the date would be visible if there was a date, otherwise it would be blank.
 

Users who are viewing this thread

Back
Top Bottom