Hello,
I have set up a combo box which shows up the values of training types.
If there is a training taken, then it has a specific date entered as well.
I would like to disable the combo box (Training Type) when there is a entry in the field Date Taken so that no one can change the training details. But when there is no data in the Date Taken field, I would like the combo box to be enabled so that I can edit the training type.
I tried the following code:
If DateTaken <> 0 Then
Form.SetFocus
CourseName.Enabled = True
Else
CourseName.Enabled =False
Forms![frmCurrentEmployeesKapil].DefaultEditing = 2
End If
Where my form name is CurrentEmployeesKapil.
Please let me know what should I do. I tried all sorts of combinations of codes but nothing seems to work. Also could you please tell me where to find the name of the combo box. I am sure I got the right name but it doesn't seem to work.
Thanks in advance
kapil
I have set up a combo box which shows up the values of training types.
If there is a training taken, then it has a specific date entered as well.
I would like to disable the combo box (Training Type) when there is a entry in the field Date Taken so that no one can change the training details. But when there is no data in the Date Taken field, I would like the combo box to be enabled so that I can edit the training type.
I tried the following code:
If DateTaken <> 0 Then
Form.SetFocus
CourseName.Enabled = True
Else
CourseName.Enabled =False
Forms![frmCurrentEmployeesKapil].DefaultEditing = 2
End If
Where my form name is CurrentEmployeesKapil.
Please let me know what should I do. I tried all sorts of combinations of codes but nothing seems to work. Also could you please tell me where to find the name of the combo box. I am sure I got the right name but it doesn't seem to work.
Thanks in advance
kapil