Sorry about the lack of information. The ANumber is not numerical. Here is an example: A081512. This is an ID that they key in to identify an employee. The DateOfService field is the date they key into the database. Does this help? I'm just trying to keep them from entering the same employee twice for the same DateOfService.
Here is a correction I made.
$sql="SELECT * FROM activitytracking WHERE ANumber=$ANumber && DateOfService=$DateOfService";
$query=mysql_query($sql);
//$data=mysql_fetch_array($query);
if (!$ANumber) == ANumber && (!$DateOfService) == DateOfService)
{
$error = "Sorry, this employee already exists for the date of service you are entering";
} else {
$Query = "Insert activitytracking (ANumber, FirstName, LastName, TeamLeader, Department, DateOfService,
NumberOfHours, ActivityType, Org, Description, TimeTakenWhen, siteID)
Values ('$ANumber', '$FirstName', '$LastName', '$TeamLeader', '$Department',
'$DateOfService', '$NumberOfHours', '$ActivityType', '$Org',
'$Description', '$TimeTakenWhen', '$siteid')";
print "Thank you. Your record has been submitted to the database.";