From: Billy B on
Is it possible to display only query names in a combo box where the queries
source contains the table [Mstr List]?

Thank you very much for any help.
From: Tom van Stiphout on
On Thu, 3 Jun 2010 05:13:46 -0700, Billy B
<BillyB(a)discussions.microsoft.com> wrote:

To do that you would have to write some VBA code to iterate over the
Querydefs collection, inspect the SQL property of each Querydef
object, and add the ones you like to the dropdown. Here is an
off-the-cuff example. You would put this code in the Form_Load event:
dim qd as dao.querydef
for each qd in currentdb.querydefs
if instr(qd.sql, "[Mstr List]") > 0 then
myCombobox.AddItem qd.name
end if
next

-Tom.
Microsoft Access MVP


>Is it possible to display only query names in a combo box where the queries
>source contains the table [Mstr List]?
>
>Thank you very much for any help.