List box with available queries question

B

Billy B

I have a list box control on a form and want the list box to display all the
queries within the database. The following code is what I have so far but it
does not work. Any help is appreciated.

SELECT [Name] FROM MSysObjects WHERE [TYPE] = 5 and LEFT([Name],1) <> "-"
ORDER BY [Name];
 
D

Dirk Goldgar

Billy B said:
I have a list box control on a form and want the list box to display all
the
queries within the database. The following code is what I have so far but
it
does not work. Any help is appreciated.

SELECT [Name] FROM MSysObjects WHERE [TYPE] = 5 and LEFT([Name],1) <> "-"
ORDER BY [Name];


It shouldn't be names starting with "-" that you exclude; it should be names
starting with "~":

SELECT [Name] FROM MSysObjects
WHERE [TYPE] = 5 And LEFT([Name],1) <> "~"
ORDER BY [Name];
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top