I have many searches to do in my program. Most of them work with select statments like second example below. But for some I need the WHERE in the second select as in the first example below. If i try to do this I get the standard error that it cannot find the record. (Either BOF or EOF is True, or the current record has been deleted. Requested operation requires a current record.) It is definiely receiving the platnumber value and also textLicensePlate field is definitly right.<BR><BR>My question is: Can you use a Where in the second select? If yes, what am I doing wrong?<BR><BR>This code gives me an error:<BR><BR>If Request.Form("CustPlateNumber") &#060;&#062; "" AND Request.Form("ChoicePlateNumber") = "fuzzymatch" Then<BR><BR>strSQL = "SHAPE {Select * from tblCustomers ORDER BY textLastName}" & _<BR> "APPEND({Select * from tblVehicles WHERE (textLicensePlate Like&#039;%%" & platenumber & "%%&#039;)} as Vehicles " & _<BR> "RELATE intCustomerID TO intCustomerID) " <BR><BR>call doConnect ()<BR>call doCustomersSearch ()<BR><BR>End If<BR><BR>This is an example of code I use somewhere else that works fine:<BR><BR>If Request.Form("CustLastName") &#060;&#062; "" AND Request.Form("ChoiceLastName") = "like" Then<BR><BR>strSQL = "SHAPE {Select * from tblCustomers WHERE (textLastName Like&#039;%%" & lname & "%%&#039;) ORDER BY textLastName}" & _<BR> "APPEND({Select * from tblVehicles} as Vehicles " & _<BR> "RELATE intCustomerID TO intCustomerID) " <BR><BR>call doConnect ()<BR>call doCustomersSearch ()<BR><BR>End If<BR><BR>I am a new programmer and completely new to datashaping.<BR><BR>Thank you<BR>thunderain