How would I set one fields value equal to something based on another table in a form. For instance, could I implement VB on enter in a form's combo box to set a number field equal to one or zero in another table based on the value entered entered in this form( I have a list of 15 names and if a supervisor enters one name as the assignee I want a field DeptID to be either a 1 or 2.
I was thinking it would go something like this
- Private Sub Assigned_To_Enter()
-
if Supervisor.Name = "John", employee.deptid = 2
-
else employee.deptid = 1
-
end if
-
End Sub
I think this is the general idea but I am fairly new to vb and dont' know how to implement this. Any help would be appreciated, I've been working on this app for weeks. Thanks