I'm trying to make a search bar in java that searchs through a MS access DB .. specifically in a field that holds autoNumber format variables .. the problem that I have is the variable that gets the search value from a text field (I converted it to integer to be comparable with the autoNumber ) this approach is not working but when I change the variable that gets the text field from integer to string and change the autoNumber to a string value the code works.