I have the following code:
I have this code set up for a combo button change so that when the user picks an employee name that they are listed in the Class Requirement Table Query and they are not listed in the Training Table and the training class name is Navigation. However, when I run the code it is not working to count the employee names with the training table - DCount("[EMPLOYEE2]", "Training Table", "[EMPLOYEE2] <> '" & Me![EMPLOYEE2] & "'"). Any suggestions???Code:If DCount("[EMPLOYEE]", "Class Requirement Table Query", "[EMPLOYEE]= '" & Me![EMPLOYEE2] & "'") And DCount("[EMPLOYEE2]", "Training Table", "[EMPLOYEE2] <> '" & Me![EMPLOYEE2] & "'") And [Forms]![Training Schedule to View Create Form].[TRAINING CLASS NAME] <> "Navigation" Then MsgBox "The Employee Name..." Me.Undo Cancel = True End If