Welcome to the new platform of Programmers Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use it's exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.
List of Tables in VBA that hides deleted tables
Hello, I got great help on this site with this problem, and now have another issue.
I have a form that has a list of tables within the database as a list box from which someone can choose a table to compare with another table. Works nicely, but displays ALL tables ever created, even the deleted ones. Could someone please help me to have it only display tables that exist?
Private Sub Form_Load()
Dim db As Database, tbl As TableDef
Set db = CurrentDb
For Each tbl In db.TableDefs
If Left$(tbl.Name, 4) <> "MSys" Then
lsTables.RowSource = tbl.Name & "; " & lsTables.RowSource