Query Table names and populate List Box erro

beginner123

Registered User.
Local time
Today, 13:56
Joined
Apr 13, 2013
Messages
44
Good Evening,

I have a query,
SELECT MSysObjects.Name AS table_name
FROM MSysObjects
WHERE (((MSysObjects.Name) Like "tbl*") AND ((Left([Name],1))<>"~") AND ((Left([Name],4))<>"MSys") AND ((MSysObjects.Type) In (1,4,6)) AND ((MSysObjects.Flags)=0))
ORDER BY MSysObjects.Name;

Which returns the table names with my database.
I can filter these to what is required and this works.

But when I add a list box and ues this query to populate the values get the following error.

List Box Wizard
No valid field can be found in "QueryTableTaskYear" Please select new source

Any help or pointers much apprieciated.
Rob
 
Hi,
I am only querying the tables in the DB.
How else can I query the tables and return the results into a list box?

Many Thanks
 
This SQL might work just as well...
Code:
SELECT Name
FROM MSysObjects
WHERE Name Like "tbl*"
ORDER BY Name;
...and if the wizard doesn't work, just do it manually. Set the RowSource property of the list.
 
Many Thanks,
The wizard didn't work but setting the RowSource property did.
 

Users who are viewing this thread

Back
Top Bottom