I have a combobox in Access 2003 whose recordset is obtained from a stored procedure. I need to find a way to add an additional item to the lists programmatically. The stored procedure returns the following StatusID and StatusName list.
1,Open
2,Closed
3,In-Process
4,Under Review
I want to add the option "All Cases" with the StatusID of "-1" to the开发者_开发问答 combobox but this value is not present in the database so I cannot pull it out from the stored procedure. How do I add it to the combobox in VBA? Thanks.
One way is to use a Union Query:
SELECT Distinct -1 as ID, "All Cases" As What FROM SomeTable
UNION
SELECT <Real stuff>
精彩评论