FileOpen(1, CustomerInfo, OpenMode.Random, , , Len(Customer))
Do While Not EOF(1)
FileGet(1, Customer)
Dim SearchString As String = lstSearch.SelectedItems.ToString
If Customer.CustomerUniqueID = SearchString.Contains(Customer.CustomerUniqueID) = True Then
frmBookings.txtCustomerForename.Text = Customer.CustomerForename
frmBookings.txtCustomerID.Text = Customer.CustomerUniqueID
frmBookings.txtCustomerSurname.Text = Customer.CustomerSurname
frmBookings.txtCustomerDOB.Text = Customer.CustomerDOB
Exit Do
End If
Loop
FileClose(1)
I'm losing my rag a little, I want to populate text boxes on a separate form but so far I've had no luck. How I'm going about doing so is trying to compare a selected index against a field in a record. If the selected index contains a text item matching the field in the if selection then the text boxes would be filled with information related to the matching record it came from. But I've got an error message saying "Conversion from string "LaneCal10 " to type 'Boolean' is not valid." LANECal10 being the unique customerID.
Any help?