1, 4 and 6 are different types of table. As I recall (not certain here):
1 = local
4 = ODBC linked
6 = Other linked
You could try looking them up though - google MSysObjects
Deleted objects in access are only flagged for deletion and not actually deleted until the database is next compacted. These "deleted" objects are prefixed with "~". Also quasi objects, such as queries that have been typed directly into a form's recordsource.
That sounds good, but when I create a text box and select a table using queries I get an error "no valid fields can be found in the "qrySelecTable." Please select a new source.
qrySelecTable is the SQL I gave you yes? So - how do you select from it? Actually - combining the ideas - why not make the query the row source for a combo box. That way you need no code or textbox - just select the table name and have the query read the combobox.
Yeah - just stick a combo on the form and paste the sql in the record source.
Thanks for the code!
Just wanted to say, that this didn't work (put the sql in record source)!
But, if I put the sql in Form_Load():
Dim strSql As String
strSql = "SELECT MSysObjects.Name as FeatureTabellen from MSysObjects WHERE (((MSysObjects.Name) Like 'Feature_Daten_*' And (MSysObjects.Name) Not Like '~*' And (MSysObjects.Name) Not Like 'MSys*') AND ((MSysObjects.Type) In (1,4,6))) ORDER BY MSysObjects.Name;"
FeatureTabellen.RowSource = strSql
It does work.
Any ideas why it won't work if I put this sql directly into the record source from my combobox?