Thank you for the prompt reply. I don't need to filter the form data.
I have a form field that filters List Box on the form. The List Box is a list of customers and according to the form field's string, list of customers on the List Box is filtered. Now, I want to have a command that will ask user to confirm certain action if the List Box comes down to just one choice. I want to write SQL in VBA as string and to use that string as recordset. Something like this:
dim db as database
dim rst as recordset
dim st as string
st = "apropriate SQL containing Like criteria"
set db = CurrentDB
set rst = db.OpenRecordset (st, dbOpenDynaset )
If rst.recordcount = 1 then
>> appropriate action <<
I hope this clarifies now.