Greetings to All!

I have a form with 2 combo boxes (CBOEmpNo, CBODeptNo) and few other controls.
I have a Search Button, that need to search on Emp Number, if CBOEmpNo has a value. Similarly, I am searching on Dept Numbers, if there is a value on CBODeptNo.

Now, if value exists in both the fields, I need to search based on the position where the cursor is? How do I find in which field the the cursor is located on my form?
Or is there any other logical way to handle?

Thanks and Regards,
Venkat.