This should get you started...
in the form load event use the following
code to loop through all the querydefs in
your database...
Dim db As Database
Set db = DBEngine(0)(0)
Dim i As Integer
For i = 0 To db.QueryDefs.Count - 1
If Left(db.QueryDefs(i).Name, 4) <> "~sq_" Then
Debug.Print db.QueryDefs(i).Name
End If
Next i
All you need to do is change the debug.print line to add
an item programmatically to the combo box. There should
be an example in the help file for this as well as more
information on the querydef object & querydefs collection...
-Tim
-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]On Behalf Of julian brunt
Sent: Wednesday, December 04, 2002 2:53 AM
To: NT 2000 Discussions
Subject: Re: OT (Again) Access
Yes I can do that bit
I am looking to find a way of displaying the queries I have written in a
combo box on a form so I can launch some process with a specific query,
otherwise I will have to populate a listbox manually and list all the
queries in my code.
>From: [EMAIL PROTECTED]
>Reply-To: "NT 2000 Discussions" <[EMAIL PROTECTED]>
>To: "NT 2000 Discussions" <[EMAIL PROTECTED]>
>Subject: Re: OT (Again) Access
>Date: Wed, 4 Dec 2002 09:52:08 +0200
>
>
>ok go into the table you want to create the combo box for
>open it in design view
>go to the field you want and where the field type is select lookup
>then you can either populate it with the values you want or use another
>tables field to populate it, or a query
>
>then go and reinsert that field on to your form in a combo box
>do you know how to do that bit?
>
>
>
>
> "julian brunt"
> <[EMAIL PROTECTED] To: "NT 2000
>Discussions" <[EMAIL PROTECTED]>
> om> cc:
> Sent by: Subject: Re: OT
>(Again) Access
> bounce-nt2000-291860@ls
> .swynk.com
>
>
> 12/04/02 09:46 AM
> Please respond to "NT
> 2000 Discussions"
>
>
>
>
>
>
>Err no.
>
>Any URLs to help me?
>
>
>
>
>
> >From: [EMAIL PROTECTED]
> >Reply-To: "NT 2000 Discussions" <[EMAIL PROTECTED]>
> >To: "NT 2000 Discussions" <[EMAIL PROTECTED]>
> >Subject: Re: OT (Again) Access
> >Date: Wed, 4 Dec 2002 09:46:55 +0200
> >
> >
> >create a lookup table for that field...do you know how to do it?
> >
> >
> >
> >
> >
> > "julian brunt"
> > <[EMAIL PROTECTED] To: "NT 2000
> >Discussions" <[EMAIL PROTECTED]>
> > om> cc:
> > Sent by: Subject: OT
>(Again)
>
> >Access
> > bounce-nt2000-291860@ls
> > .swynk.com
> >
> >
> > 12/04/02 09:42 AM
> > Please respond to "NT
> > 2000 Discussions"
> >
> >
> >
> >
> >
> >
> >Does anyone know how to produce a list menu/combo box on a form and
> >populate
> >this with a list of all the queries stored in the Access Database?
> >
> >This will make my life so much easier.
> >
> >Thanks In advance
> >
> >Julian
> >
> >
> >
> >
> >
> >_________________________________________________________________
> >The new MSN 8: smart spam protection and 2 months FREE*
> >http://join.msn.com/?page=features/junkmail
> >
> >
> >------
> >You are subscribed as [EMAIL PROTECTED]
> >Archives: http://www.swynk.com/sitesearch/search.asp
> >To unsubscribe send a blank email to %%email.unsub%%
> >
> >
> >
> >
> >
> >------
> >You are subscribed as [EMAIL PROTECTED]
> >Archives: http://www.swynk.com/sitesearch/search.asp
> >To unsubscribe send a blank email to %%email.unsub%%
>
>
>_________________________________________________________________
>The new MSN 8: smart spam protection and 2 months FREE*
>http://join.msn.com/?page=features/junkmail
>
>
>------
>You are subscribed as [EMAIL PROTECTED]
>Archives: http://www.swynk.com/sitesearch/search.asp
>To unsubscribe send a blank email to %%email.unsub%%
>
>
>
>
>
>------
>You are subscribed as [EMAIL PROTECTED]
>Archives: http://www.swynk.com/sitesearch/search.asp
>To unsubscribe send a blank email to %%email.unsub%%
_________________________________________________________________
The new MSN 8: smart spam protection and 2 months FREE*
http://join.msn.com/?page=features/junkmail
------
You are subscribed as [EMAIL PROTECTED]
Archives: http://www.swynk.com/sitesearch/search.asp
To unsubscribe send a blank email to %%email.unsub%%
------
You are subscribed as [email protected]
Archives: http://www.swynk.com/sitesearch/search.asp
To unsubscribe send a blank email to [EMAIL PROTECTED]