Runtime error "3021" with search button

wow thank you so much worked like charm i would ask what the problem was but i dont want to waste your time
 
No no please do ask, I should have typed in the explanation along with the code, was in a hurry..

Well the problem was because.. You have used both Filter and Recordsets.. When all it needed was Recordset.. When you use Filters, the filters are saved when you close the Form, so for example..

A previous "SUCCESSFUL" search would have saved the Filter as, Code like 111, so your RecordsetClone will not be empty, however once you Create a New filter.. The criteria to filter changes.. The code you had previously No match we did not look for the match in the first place.. So the changed code removed the Filter setting lines..

After the Criteria is changed we try to Seek the Filter, if it does not have any only then the NoMatch is made effective.. Make sense?
 
oh wow yup makes perfect sense

thank you so much for your time and efforts very grateful:D
 
Hi pr2-eugin

just a quick question is there a way i can modify this code so i can search in multiple tables

for example right now it searches just my orders table which is assigned to the form how ever id like it to also search the address from customers table according to the customer id
 

Users who are viewing this thread

Back
Top Bottom