Searching in a lookup field

Searching in a lookup field

I am trying to set up a search page based on a lookup field (Child's Name). This generates the ID number. 
The search field (Search Child) is defined as a Bigint but in the HTML page the searchParam is defined as a string even though it is actually a number. This means the searchParam never matches the Child's Name field.

I tried changing the searchParam to be defined as a number but it gave an error saying it was trying to update to a different data type. How can I adjust the code so the search by Child's Name will match the mainform and find the records for that child? and display the child's name and not their ID?