I am trying to list table names in a combo box row source set to Value List. When I Debug.Print the combo box it shows in immediate window all the table names I need however combobox displays only the last table name. Have no idea how to fix the function so all tables are listed in combobox row source.
Code:
Dim db As DAO.Database
Dim tdf As DAO.TableDef
Set db = CurrentDb
Me.cboPipeAllowTable.RowSource = ""
For Each tdf In db.TableDefs
If tdf.Name Like "tblPipeAllow(*)" Then
Me.cboPipeAllowTable = tdf.Name
Debug.Print cboPipeAllowTable
End If
Next
Set tdf = Nothing
Set db = Nothing