I have a listbox on a form that I am populating with the
table names. It populates okay but I have 2 table naming
methods; tblTableName and usrtblTableName. I am using the
following SELECT statement to populate the list box. What
I would really like to do is only populate with the list
box with the tables beginning with tbl.
Can this be done? What needs changing in the following
statement?
SELECT MSysObjects.Name FROM MsysObjects WHERE
(Left$([Name],1)<>"~") AND
(Left$([Name],4) <> "Msys") AND (MSysObjects.Type)=1 ORDER
BY MSysObjects.Name;
Any assistance would be appreciated.
*** John
John
You just need to change it to:
SELECT MSysObjects.Name FROM MSysObjects
WHERE (Left(MSysObjects.Name,3)="tbl") AND (MSysObjects.Type=1)
ORDER BY MSysObjects.Name;
--
Jon
www.applecore99.com - Access Tips and Tricks
.