I changed
(txtIdNumber.Text) - 1)
to '0' in the line
txtFirstName.Text = CStr(dtVisitorDetails.Rows(CInt(CDbl(txtIdNumber.Text) - 1)).Item(1))
and the lines for lastName, company, etc.
So the line now reads
txtFirstName.Text = CStr(dtVisitorDetails.Rows(0).Item(1))
which has solved my problem. I thought that if I had '0' there that it would return row '0'(i.e. ID number 1) each time, but this is not the case as I am querying the ID number in my sql statement so it shows the ID number queried.