Set the row source to the original SQL you use to open the recordset, plus
UNION <ALL>...
--
Doug Steele, Microsoft Access MVP
(no e-mails, please!)
Ken said:
Thanks. Do you have any suggestion on my case?
I have a combo box (WarehouseCode) which depends on the ProductCode. I
use ADO to build a query to extract all information and union with <ALL> for
the warehousecode combo box. So as a result in the combo box list, I will
have <ALL> as the first choice followed by all warehouse codes. I got all
these done perfectly. However, if there is no warehouse code associated
with this product, in the list I still see <ALL> as one and only one choice.
So what I am going to do is, after I got the recordset, I test if it is EOF.
If yes said:
Select * from rst1 union <ALL> ....
But at run-time, I got message saying rst1 is disconnected or misspelled or recordset is not exist.
I put a debug.print rst1.getstring before the Select statement, I got all
expected rescords printed. Quite confuse about the message. Any idea?