D
Dave - Freedonia
I am trying to display the names of the tables in an Access database in
a combo box.
I have created a query to get the table names. Here is the query:
------
SELECT [MsysObjects].[Name] AS Tablename
FROM MsysObjects
WHERE (((Left$([Name],1))<>"~") And ((Left$([Name],4))<>"Msys") And
(([MsysObjects].[Type])=6))
ORDER BY [MsysObjects].[Name];
------
When run, this will show me the table names.
If I create a new form and insert a combo box and use the above query as
the record source, I get this error message:
"No valid fields can be found in 'qryTableNames'. Please select a new
source."
qryTableNames is the name of the query from above. If I change the
query to a make table query and change combobox to look at that table, I
still get the same error message.
I noticed for the make table query, when I view the table design, the
field (TableName) is listed as a text field but the column has
AutoNumber at the bottom.
I am using Access 2000 SP1 and Windows XP SP1.
Any ideas?
Thanks,
Dave
a combo box.
I have created a query to get the table names. Here is the query:
------
SELECT [MsysObjects].[Name] AS Tablename
FROM MsysObjects
WHERE (((Left$([Name],1))<>"~") And ((Left$([Name],4))<>"Msys") And
(([MsysObjects].[Type])=6))
ORDER BY [MsysObjects].[Name];
------
When run, this will show me the table names.
If I create a new form and insert a combo box and use the above query as
the record source, I get this error message:
"No valid fields can be found in 'qryTableNames'. Please select a new
source."
qryTableNames is the name of the query from above. If I change the
query to a make table query and change combobox to look at that table, I
still get the same error message.
I noticed for the make table query, when I view the table design, the
field (TableName) is listed as a text field but the column has
AutoNumber at the bottom.
I am using Access 2000 SP1 and Windows XP SP1.
Any ideas?
Thanks,
Dave