Hi,
I have a continuous form with History of tasks. I have the fields: Id, Date, Task, TaskFinished(Yes/No), Employee. I want field TaskFinished to be enabled after user write a Task (and it should be disabled if there is no task). Same happens to fields TaskFinished and Employee. I wrote the code:
Code:
Private Sub Form_Current()
If IsNull(Me![Task]) Then
Me.TaskFinished.Enabled = False
ElseIf Not IsNull(Me![Task]) Then
Me.TaskFinished.Enabled = True
End If
If Me![TaskFinished].Value = False Then
Me.Employee.Enabled = False
ElseIf Me![TaskFinished].Value = True Then
Me.Employee.Enabled = True
End If
End Sub
Here is the problem:
If I write something in field "Task" not only current "TaskFinished" is enabled, but it looks like all of the "TaskFinished" are enabled. Obviously same thing happens to TaskFinished and Employee (If I confirm that task if finished all Employee fields are enabled). However in both examples it is only graphic effect, you cant really write any values. How to fix it?
And another thing. How to enable "TaskFinished" field immediately after writing sth in "Task" field. If I set requery command after update in "Task" field, it seems that I have to click somewhere to really requery it. Any solution?
I have attached a simply example of this database.
Thanks for your time.