List Box

O

Octet32

I have alist box that i would like to remove some of the table shown
in the Row source i have the following Statement
I will guess i need to add a NOT IN [NAME] some where.

SELECT [Name] FROM MSysObjects WHERE [Type]=5 And Left ([Name],1)<> "~"ORDER
BY [NAME]

Octet
 
O

Octet32

Wher in the string would the NOT IN be placed?

Douglas J. Steele said:
That's correct.

--
Doug Steele, Microsoft Access MVP

(no private e-mails, please)


Octet32 said:
I have alist box that i would like to remove some of the table shown
in the Row source i have the following Statement
I will guess i need to add a NOT IN [NAME] some where.

SELECT [Name] FROM MSysObjects WHERE [Type]=5 And Left ([Name],1)<>
"~"ORDER
BY [NAME]

Octet
 
O

Octet32

I Tried this
ELECT [Name] FROM MSysObjects WHERE [Type]=5 And Left ([Name],1)<> "~" NOT
IN [NAME] (MakeTable),ORDER BY [NAME]
But it doesnt work

Octet32 said:
Wher in the string would the NOT IN be placed?

Douglas J. Steele said:
That's correct.

--
Doug Steele, Microsoft Access MVP

(no private e-mails, please)


Octet32 said:
I have alist box that i would like to remove some of the table shown
in the Row source i have the following Statement
I will guess i need to add a NOT IN [NAME] some where.

SELECT [Name] FROM MSysObjects WHERE [Type]=5 And Left ([Name],1)<>
"~"ORDER
BY [NAME]

Octet
 
D

Douglas J. Steele

Assuming that you're trying to eliminate a table named MakeTable, you'd use

SELECT [Name]
FROM MSysObjects
WHERE [Type]=5
AND Left ([Name],1)<> "~"
AND [Name] <> "MakeTable"
ORDER BY [NAME]

If you were trying to eliminate multiple tables, you'd use

SELECT [Name]
FROM MSysObjects
WHERE [Type]=5
AND Left ([Name],1)<> "~"
AND [Name] NOT IN ("MakeTable", "Table1", "Table2")
ORDER BY [NAME]



--
Doug Steele, Microsoft Access MVP

(no private e-mails, please)


Octet32 said:
I Tried this
ELECT [Name] FROM MSysObjects WHERE [Type]=5 And Left ([Name],1)<> "~" NOT
IN [NAME] (MakeTable),ORDER BY [NAME]
But it doesnt work

Octet32 said:
Wher in the string would the NOT IN be placed?

Douglas J. Steele said:
That's correct.

--
Doug Steele, Microsoft Access MVP

(no private e-mails, please)


I have alist box that i would like to remove some of the table shown
in the Row source i have the following Statement
I will guess i need to add a NOT IN [NAME] some where.

SELECT [Name] FROM MSysObjects WHERE [Type]=5 And Left ([Name],1)<>
"~"ORDER
BY [NAME]

Octet
 
O

Octet32

Works great thanks

Douglas J. Steele said:
Assuming that you're trying to eliminate a table named MakeTable, you'd use

SELECT [Name]
FROM MSysObjects
WHERE [Type]=5
AND Left ([Name],1)<> "~"
AND [Name] <> "MakeTable"
ORDER BY [NAME]

If you were trying to eliminate multiple tables, you'd use

SELECT [Name]
FROM MSysObjects
WHERE [Type]=5
AND Left ([Name],1)<> "~"
AND [Name] NOT IN ("MakeTable", "Table1", "Table2")
ORDER BY [NAME]



--
Doug Steele, Microsoft Access MVP

(no private e-mails, please)


Octet32 said:
I Tried this
ELECT [Name] FROM MSysObjects WHERE [Type]=5 And Left ([Name],1)<> "~" NOT
IN [NAME] (MakeTable),ORDER BY [NAME]
But it doesnt work

Octet32 said:
Wher in the string would the NOT IN be placed?

:

That's correct.

--
Doug Steele, Microsoft Access MVP

(no private e-mails, please)


I have alist box that i would like to remove some of the table shown
in the Row source i have the following Statement
I will guess i need to add a NOT IN [NAME] some where.

SELECT [Name] FROM MSysObjects WHERE [Type]=5 And Left ([Name],1)<>
"~"ORDER
BY [NAME]

Octet
 
Top