You always want to limit the scope, life, and size of your variables. This is good coding practice.
Integer
Size: 2 bytes
Values: -32,768 to 32,767
Long (long integer)
4 bytes
-2,147,483,648 to 2,147,483,647
Double(double-precision floating-point)
8 bytes
-1.79769313486231E308 to
-4.94065645841247E-324 for negative values; 4.94065645841247E-324 to 1.79769313486232E308 for positive values
So an integer requires 2bytes and a double requires 8 bytes. However if you are going beyond 32,767 then use a 4 byte long which goes up to 2,147,483,647
Again, I am not sure how the user interacts with this form, but I am hearing that when the form opens it should be a blank record. One way to do this is to set the form to
DataEntry = True
in its properties. This opens and shows only a new blank record. Now in your code add to the very beginning:
Me.DataEntry = False
So the forms switches to a "show all" mode once they start looking for something.
Again it depends how you use the form. If this is for display purposes only then you could also go back to an unbound form. Each textbox using a dlookup function that references the EMPNO. Something like this for the empName textbox
=dlookup("empName","tblEmployees","EMPNO=" & cboEcode.Column(0))